Abstract Modifier
Abstract: A class can be modified to indicate an abstract class. Note: the unique difference between an abstract class and a specific class: A class cannot create objects, but a specific class can create objects.
1. The specific classes have constructor methods, and the abstract classes also have constructor methods.
2. A specific class can have instance attributes, and an abstract class can also have instance attributes.
3. The specific class can have instance methods, and the abstract class can also have instance methods.
4. A specific class can inherit another specific class, and an abstract class can inherit another specific class.
Abstract: A method can be modified to indicate that this is an abstract method, and there is a declaration of the method, which is not implemented.
Abstract classes are specially used for inheritance.
When a class inherits the abstract class, if all the abstract methods in the abstract class are implemented, the class is a specific class.
If a class inherits an abstract class and only implements the abstract methods in the abstract class, the class must be declared as an abstract class.
Abstract modifier, the difference between a specific class and an abstract class