Abstract classes and abstract methods
Classes that are decorated with the abstract keyword are called abstract classes. An abstract class is a special class.
Definition syntax:
[Access modifier] Absrtact class class Name {[Class member]}
Description
The Absrtact keyword that is used to decorate the class. The class being decorated is called an abstract class.
Abstract and non-abstract methods can be included in an abstract class.
Application:
The implementation of the class as a template requires that the implementation in the child class be constrained.
Overview:
The method of modification by the abstract broad-Jian character is called an abstraction method. An abstract method has no method body and can only be defined in an abstract class.
Grammar:
[Access modifier] Abstract return value type method name ([parameter list]);
Characteristics:
Abstract methods can only be defined in abstract classes
An abstract method has no method body and must be implemented in a non-abstract subclass
Role:
Constrain subclasses to improve extensibility.
java--Abstract class