Abstract keyword



Abstract class
1. We need to declare the abstract class by putting abstract keyword before class.
2. We cannot create objects of abstract class but we can create reference variables of abstract class.
3. An abstract class may or may not contents abstract methods.

Abstract method
1. We need to declare the Abstract method by using abstract keyword.
2. It contents no method body.
3. It is mandatory to override abstract method in its child classes.
@overriding is to tell JVM we are overriding the method.

Post a Comment

0 Comments