Interface
1. interfaces only provide method conventions, but do not provide method bodies;
2. Methods in the interface cannot be modified with keywords;
3. interfaces and variables cannot exist in interfaces;
4. All methods in the interface must be implemented in the subclass;
5. The interface can implement multiple inheritance;
Abstract class
1. abstract classes can be inherited from interfaces;
2. entity methods in abstract classes cannot be rewritten in subclasses, but can only be referenced;
3. abstract methods in abstract classes cannot have method bodies. abstract methods in abstract classes must be overwritten in subclasses;
4. The virtual methods in the abstract class can be selectively rewritten in the subclass;
Virtual Method
1. It can be selectively rewritten in the subclass;
2. It can also be called by the quilt class without rewriting;
Similarities and differences between interfaces and abstract classes
1. abstract class abstract methods and methods in the interface must all be implemented in the subclass;
2. Methods in abstract methods and interfaces cannot have method bodies;
Similarities and differences between abstract and Virtual Methods
1. The class of the abstract method must be an abstract class, and the virtual method can be in any class;
2. abstract methods must be overwritten, and virtual method rewriting is optional;
3. abstract methods cannot be called by the quilt class. Virtual methods can be called by the quilt class;
4. Abstract METHODS cannot have method bodies. Virtual methods must have method bodies;