Abstract is an important keyword in Java that can be used to decorate a class or a method. When a method is decorated, it means that the method has only signature signatures (signature), there is no specific implementation, but rather a specific implementation is left to inherit the subclass of the class. As long as there is an abstract method in a class, the class is declared abstract, but it can have non-abstract methods.
The abstract class allows the designer of a class to create a prototype of the method, and the real implementation is left to the person who uses the class.
Inheriting a subclass of an abstract class, either implementing all the abstract methods of the parent class, or declaring it as an abstract class, you can still retain some abstract methods, leaving the implementation to the next level of subclasses.
Abstract classes and interfaces, you cannot create instances of them. An abstraction class cannot create an instance directly from new, even if there is a public constructor. Because since it is an abstract class, there is at least one abstract method, so you must create a subclass of the abstract class (usually an anonymous class inside) Implement the abstract method.
Abstract classes in Java