One of the major features of Java is that it inherits.
1. Because a subclass inherits a parent class, it has a later polymorphism.
2. Class inheritance, not to save code, inheritance for inheritance, and that no related classes linked together, inheritance must be used in is a, for example, students in the large category of people, cats in the big category of cats.
3. The inheritance of class greatly improves the reusability of code and saves the code. It also facilitates post-code maintenance.
4. When a subclass inherits from a parent class, the child class cannot inherit the call if it has a member or method that is decorated by private in the parent class.
5, in multi-layer inheritance, the lowest subclass inherits all the members and methods that all of the parent classes can inherit.
6. In Java, multiple inheritance is not supported, because when a subclass invokes a member or method inside a parent class, the same member or method appears in the parent class, and the child class cannot know which member or method of the parent class is called.
7. Although multiple inheritance is not supported in Java, it is still retained because it is possible to implement " multiple implementations " in other ways, i.e. interfaces (not yet self-taught).
Key to inheritance in Java