Abstract: Not specific, can not understand.
Abstract class representation manifests itself. In the continuous extraction process, the common content of the method declaration extraction, but the method is not the same, no extraction, then the method extracted, not specific, need to be specified by the keyword abstract marked, declared as an abstract method.
The class in which the abstract method resides must be marked as an abstract class, meaning that the class needs to be decorated with the abstract keyword.
Features of abstract classes:
1: Abstract methods can only be defined in abstract classes, abstract classes and abstract methods must be decorated by the abstract keyword (you can describe classes and methods, and you cannot describe variables).
2: Abstract methods define method declarations only and do not define method implementations.
3: Abstract class can not be created object (instantiation).
4: This subclass can be instantiated only if the subclass inherits the abstract class and overrides all abstract methods in the abstract class. Otherwise, the subclass is an abstract class.
The details of the abstract class:
1: Is there a constructor in an abstract class? There, used to initialize the subclass object.
2: Is it possible to define non-abstract methods in an abstract class? OK. In fact, there is not much difference between abstract class and general class, it is to describe things, but abstract classes describe things, some functions are not specific. Therefore, both abstract and generic classes need to define properties and behaviors in the definition. However, there is an abstract function more than the general class. And it's a little less than a generic class. The part that creates the object.
3: Abstract keyword and which cannot coexist? Final, private, static
4: Can I not define abstract methods in an abstract class? OK. The abstract method is intended only to keep the class from creating objects.
Java keyword-abstract