Abstract Class
The most important cases in java abstraction
- Abstract classes may or may not contain abstract methods ie., methods with out body ( public void get(); )
- But, if a class have at least one abstract method, then the class must be declared abstract.
- If a class is declared abstract it cannot be instantiated (an object cannot be created ).
- To use an abstract class you have to inherit it from another class, provide implementations to the abstract methods in it.
- If you inherit an abstract class you have to provide implementations to all the abstract methods in it.