Ask the Expert

Multiple interface inheritance in Java

What is the disadvantage of using multiple inheritance in Java. How can we solve the problem using interface?

    Requires Free Membership to View

Java does not support multiple class inheritance. Java does, however, support multiple interface inheritance. Therefore, a class can realize multiple "personalities" using something similar to the following construct:

public interface SuperSizable

   extends java.io.Serializable, Comparable

{

   public void superSize();

} 

This was first published in January 2006

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.