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.


regarding inheritance

Posted by Amit Patel on February 21, 2001 at 12:30 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 .


Sponsored Links

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