• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple inheritance

 
Kamlesh Devani
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In java multiple inheritance is done by extending a super class & implementing an interface to a sub class. I wanted to know why java does not supports pure multiple inheritance which is possible in C++? Why there is a need for an interface. Can anybody help me to clear my doubt?...

Thanks in advance...
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI please.. http://www.javaworld.com/javaqa/2002-07/02-qa-0719-multinheritance.html
[ July 01, 2005: Message edited by: Srinivasa Raghavan ]
 
muthukumaran krishnaswamy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its to avoid the ambiguity that may arise due to virtual inheritance
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keep in mind that C++ and Java are two different languages, even though their ideas are very similar.

Thus, you cannot compare the orange and apple directly, just like why English supports present/past/future tenses in verbs while Chinese does not.

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic