What is the difference between Abstract Class and Interface
Answer Posted / tarun jangra
1. An abstract class is a specialization whereas Interface
is a generalization. That means an abstract class is created
when only few class wants to share some methods,when you
have to create some methods to be shared by all the classes
then interface is used.
2. An abstract class can have non-abstract methods (means
methods with implementation) while all the methods in an
Interface are by default abstract.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Is the milky way in a void?
What is a numeric format?
What is the difference between class forname and new?
Why does java have two ways to create child threads? Which way is better?
Is array size fixed in java?
What is the role of the java.rmi.naming class?
When a byte datatype is used?
Difference between static and dynamic class loading.
What do you mean by aggregation?
Explain the difference between hashmap and hashtable in java?
What is protected access modifier?
What is the advantage of OOP in java?
What is the difference between this() and super() in java?
What is hash in java?
What is unicode full form?