[metaslider id="213"]

Multiple inheritance is not supported in case of class because of ambiguity. But it is supported in case of interface because there is no ambiguity as implementation is provided by the implementation class.

When a class implements multiple interfaces, or an interface extends multiple interfaces i.e. known as multiple inheritance.

Do check this post for detail explanation
https://www.geeksforgeeks.org/java-and-multiple-inheritance/

 

Multiple inheritance in Java by interface

Post navigation


Leave a Reply

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