The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
May 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

multiple inheritance

Posted by Sunitha on May 31, 2000 at 7:35 PM

As you may be aware Java does not support multiple inheritance.
When using abstract classes you need your class to inherit from
the abstract class. Since you can inherit from one class only,
it limits the scope for your design.

Java supports multiple inheritance by using interfaces. Interfaces
have to have all abtract methods ( unlike abstract classes that can
have some concrete methods). A class can implment a number of
interfaces thus giving a sort of multiple inheritance.





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us