Abstract classes can be inherited. (Recommended: java video tutorial)
1. An abstract class is just a special class, but it also has the characteristics of a class.
2. If there is an abstract method in this class, then this class must be defined as an abstract class.
3. If this abstract class inherits other abstract classes, then the abstract method does not need to be overridden.
Abstract classes contain more than one abstract method. These methods only provide function names and do not define how to implement them. They are implemented by inherited derived classes. Derived classes must implement all abstract class methods at the same time, otherwise they will It will become another abstract class in itself.
For more java knowledge, please pay attention to the java basic tutorial column on the PHP Chinese website.
The above is the detailed content of Can abstract classes in java be inherited?. For more information, please follow other related articles on the PHP Chinese website!