when to use abstract class and when to use interface?
Answer Posted / jc
If you want give different implementation(behaviour) to
methods which are available in the interface go for
interface.
If you want give different implementation to particular
methods(that is only some methods which are not similar to
subclass)go for abstract class.
Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is multi-catch block in java?
What is the difference between overriding and overloading in OOPS.
What are 5 boolean operators?
What is floor math?
What is the static import?
What is collections framework?
What sorting algorithm does javascript use?
Can a class be final?
Does java support function overloading, pointers, structures, unions or linked lists?
what is difference between equals and ==?
Implement two stacks using a single array.
What restrictions are placed on method overriding?
What are packages in java?
Is hashset sorted in java?
What is the differences between c++ and java? Explain