One is to inherit the parent class. The subclass can only implement some methods in the parent class. The parent class can contain member methods (that is, the function has a function body). A subclass can only inherit one parent class.
The other is to implement an interface. A class can implement multiple interfaces at the same time and inherit a parent class at the same time. During the implementation process, all methods in the interface must be implemented. The interface can only have method names, not Method content (only function name, no function body).
One is to inherit the parent class. The subclass can only implement some methods in the parent class. The parent class can contain member methods (that is, the function has a function body). A subclass can only inherit one parent class.
The other is to implement an interface. A class can implement multiple interfaces at the same time and inherit a parent class at the same time. During the implementation process, all methods in the interface must be implemented. The interface can only have method names, not Method content (only function name, no function body).
Probably like this