Can interface extends abstract class in Java?

Remember, a Java class can only have 1 superclass, but it can implement multiple interfaces. Thus, if a class already has a different superclass, it can implement an interface, but it cannot extend another abstract class . Therefore interfaces are a more flexible mechanism for exposing a common interface.

Sizin İçin Seçtik  How do you identify a class interface?

Leave a Reply

Your email address will not be published. Required fields are marked *