Q
Problem solve Get help with specific problems with your technologies, process and projects.

Multiple interface inheritance in Java

A SearchWebServices.com member asks "What is the disadvantage of using multiple inheritance in Java. How can we solve the problem using interface?" Read the response or pose a question of your own.

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

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();

}

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close