The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 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.


multiple inheritance

Posted by amitosh on July 27, 2000 at 10:31 AM

I wish to ask you certain doubts . While reading the subject , I got the feeling that most of the books are written with the 'how' and not 'why' approach . And certain design aspects are left unanswered .
Like :
1) why was there a need for 'abstract classes' when ( seemingly) all the functionality could be achieved by the use of interface / concrete classes ?
2) why didn't Sun provide for multiple inheritance for classes and did it for interfaces - as far as I could reckon , there is virtually no difference between the two ( an interface is as good as an abstract class ) ? ( I am not particularly convinced with the argument that it makes the compilers complex - after all it does exit already in C++ compiler .)
3) how do togging interfaces viz. 'cloneable', ' serializable' etc. work ; which do not have any methods declared ( or defined ) inside them. Also, are these not the examples of multiple inheritance in some way ?

There must be more design aspects which I have not been able to come up to. I request you to please tell me where I can the answer to these questions as well as a more in depth dealing about why Java is the way it is . Please suggest me the readable books on the topic .

  • regarding inheritance Amit Patel February 21, 2001 at 12:30 AM (0)
  • Java venu December 13, 2000 at 8:18 AM (2)
    • Re: A.P October 18, 2001 at 11:53 PM (1)
      • Java Design Matt Gerrans October 19, 2001 at 2:05 PM (0)

Sponsored Links

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