correct answer is 4
Abstract Class
A class which contains the abstract keyword in its declaration is known as abstract class.
Abstract classes may or may not contain abstract methods, i.e., methods without body ( public void get(); )
But, if a class has at least one abstract method, then the class must be declared abstract
we can not create object for abstract class reason : why ?
abstract class is designed only to act as a base class to be inherited by other classes.
--------------------------------------------------------------------------------------------------------------------------------------------------
more information
- If you inherit an abstract class, you have to provide implementations to all the abstract methods in it