Part 16
Part 16
The abstract keyword is used to achieve abstrac on in Java. It is a non-access modifier which is used
to create abstract class and method.
The role of an abstract class is to contain abstract methods. However, it may also contain non-
abstract methods. The method which is declared with abstract keyword and doesn't have any
implementa on is known as an abstract method.
Syntax:-
2. {
4. }
Don'ts