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
Can an interface be defined inside a class?
What is private static class in java?
What is the maximum size of list in java?
State differences between C and Java?
What do bitwise operators do?
Is sizeof a preprocessor?
What is the use of keywords in java?
What is stream api in java8?
Which collection is best for sorting in java?
What is the use of join method?
What is string value?
What is the super void?
What is floor in java?
Can the interface be final?
What is the differences between heap and stack memory in java? Explain