Can the Java interview question interface inherit the interface? Can abstract classes implement interfaces?

Can an interface inherit an interface? Can abstract classes implement interfaces? Can abstract classes inherit entity classes?

Answer: The interface can inherit the interface. Abstract classes can implement interfaces. The abstract class can inherit the entity class, but the premise is that the entity class must have a clear constructor.

Note: The ordinary class inherits the abstract class and must implement its abstract methods. If you do not want a concrete implementation, then the subclass must also be declared as an abstract class.

Guess you like

Origin blog.csdn.net/weixin_44296929/article/details/108344887