Home           J2EE Concepts           JMS           Java Language           Contact           Back           Next           Bookmark this Page          










Some useful tips related to:
 - health & fitness
 - vehicle care
 - cooking
 - misc household tasks

Abstract Classes Overview


Abstract classes may or may not have implementation for specific methods. The idea is to provide partial implementation to child classes.
If a class implements an interface but doesn't provide implementation for all methods, then that class must be declared as abstract.


Interfaces Vs. Abstract Classes


Following are the significant differences:
- An interface cannot implement any methods, whereas an abstract class can.
- A class can implement many interfaces but can have only one superclass.
- An interface is not part of the class hierarchy. Unrelated classes can implement the same interface.