Same point:
1. Both are located at the top of the inheritance and are used for other implementations or inheritance.
2. Neither can be instantiated.
3. You can define an abstract method whose subclass/implementation class must override these abstract methods.
Different:
1. The interface does not have a constructor method, and the abstract class has a constructor method.
2. Abstract classes can contain common methods and abstract methods, and interfaces can only contain abstract methods (before Java8).
3. A class can inherit only one direct parent class (possibly an abstract class), the interface is multi-inherited, and only one class is allowed to implement multiple interfaces.
4. Variable: The default is pubic static final in the interface, and the abstract class is the default package permission.
5. Method: The default is public abstract in the interface, abstract class default is the default package access rights.
6. Internal class: The default is public static interface, abstract class default is the default package access rights.
If the interface and implementation classes are capable of accomplishing functions, use interfaces as much as possible and interface-oriented programming.
The difference between an interface and an abstract class