The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000



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.


Re: Multple Inheritance

Posted by Ira Jain on September 15, 2000 at 10:14 AM

> I have library of some classes.
> Now I want to create one class, which extends three classes from library.
> Say in library there are class A, B and C.
> I want to create class D which extends A,B and C.
> How can I do that?
> Is it possible?
> Thank you very much in advance.
> Regards,
> Dinesh

No ,you cannot extend from multiple classes .In Java ,multiple inheritance is supported thru Interfaces.So ,if possible,create A,B,C as interfaces and then let class D implement them.



Sponsored Links

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