Answer Posted / devendra.m
Both Absstract classes and interfaces can be used when there
is a difference in subclass types.
When subclass type is totally different then implement the
interfaces.When subclass type is partially common in the
super type then extends the abstract class.Internally some
comman behaviour is there incase of abstract classes.
incase of interface we can achieve multiple inheritace.but
incase of classes we can not achieve multiple inheritace.
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
What is the base class of all exception classes?
Where are local variables stored?
Why array is used in java?
What is stack example?
What is the technique adopted to create an immutable class?
Differece between class and generic class?
How do you compare values in java?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
Explain the difference between extends thread vs implements runnable in java?
Is boolean a data type in java?
What are some alternatives to inheritance?
how to prepare for IT Officers Interview in Banks
What is the difference between choice and list?
What is java string pool?
How to print nodes of a Binary tree?