Difference between abstract class and interface:
1: Abstract classes can only be inherited, and only single inheritance. Interfaces need to be implemented, and there can be multiple implementations.
2: Non-abstract methods can be defined in abstract classes, and subclasses can directly inherit and use them. There are abstract methods in the interface, which need to be implemented by subclasses.
3: The abstract class uses the is a relationship. The like a relationship used by the interface.
4: Member modifiers of abstract classes can be customized. Member modifiers in interfaces are fixed. All are public.