The concepts of interfaces and abstract classes are different. The interface is the abstraction of actions, and the abstract class is the abstraction of the source. The abstract class indicates what this object is. The interface indicates what the object can do. For example, men and women (if they are classes ......), Their abstract class is human. It means they are all people. People can eat, dogs can also eat, you can define "eat" as an interface, and then let these classes implement it. therefore, in advanced languages, a class can only inherit one class (abstract class) (just as humans cannot be both biological and non-biological ), however, multiple interfaces (meal and walking interfaces) can be implemented ). First, the interface is a variant of the abstract class, and all the methods in the interface are abstract. Abstract classes are classes that declare the existence of methods rather than implementing them. Second, interfaces can be inherited. abstract classes cannot. Third, interfaces can define methods and cannot be implemented. abstract classes can implement some methods. Fourth, the basic data type in the interface is static, but the image is not. When you focus on the essence of a thing, use abstract classes; when you focus on an operation, use interfaces. Interfaces can be implemented or inherited. abstract classes do not support abstract classes, which far exceed interfaces. However, it is costly to define abstract classes. Because in advanced languages (also in actual design), each class can only inherit one class. In this class, you must inherit or compile all the commonalities of all its sub-classes. Although the interface is much weaker in function, it only describes an action. In addition, you can implement multiple interfaces in a class at the same time. This will reduce the difficulty in the design phase.