An abstract class is a class that contains at least one abstract method. An abstract method is a method that is declared, but not implemented in the code.
When can define a class abstract using the abstract keyword. An class which is defined as abstract cannot be instantiated.
Following are some important points about abstract class and method:
Example :let's simply understand abstract class given below :
Output : 30
Example 2 : Cannot be directly instantiate.
Output: