abstract is a Java keyword. It can be applied to a class and methods. An abstract class cannot be directly instantiated. It must be placed before the variable type or the method return type. It is recommended to place it after the access modifier and after the
static keyword. A non-abstract class is a concrete class. An abstract class cannot be
Only an abstract class can have abstract methods. An abstract method is only declared, not implemented:
|Code listing 1: AbstractClass.java
An abstract method cannot be
native. Either you instantiate a concrete sub-class, either you instantiate the abstract class by implementing its abstract methods alongside a new statement:
|Code section 1: Abstract class use.
A private method cannot be