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 a map? What are the implementations of map?
Does java initialize arrays to zero?
What are the approaches that you will follow for making a program very efficient?
Explain about field hiding in java?
What is meant by inheritance and what are its advantages?
Write a java program to count the number of words present in a string?
Is null in java?
What is the program development process?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
Is class is a data type?
What is the difference between logical data independence and physical data independence?
What is abstraction in java?
What are the rules for variable declaration?
Which class should you use to obtain design information about an object in java programming?
How do I compare two strings in word in java?