1. Classes and classes can be represented as inheritance relationships, expressed by the extends keyword. This is because if a class inherits Class A and Class B, if AB has two similar methods, it cannot determine which method to inherit, therefore, class inheritance can only be one-to-one. However, a class can have multiple subclasses,A class can have only one parent class.
2. The relationship between classes and interfaces can be expressed as an implementation relationship, expressed by the implements keyword. A class can implement multiple interfaces. Because methods in interfaces are abstract methods,
Only the form has no specific implementation, which is implemented in the class.
3. An interface and an interface can be represented as an inherited relationship. An interface is represented by the extends keyword. An interface can inherit multiple interfaces.
The number of inheritance between classes and classes, classes and interfaces, and interfaces