Q

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

}
This was last published in January 2006

Dig Deeper on Java Web Services

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close