• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple inheritance

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
1. I want to know why java doesnt support multiple inheritance ?
what is the difference between multiple n multi level inheritance?
2. what is the advantage of swing over other user interface?
 
dshadrach
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With refrence to your question about multiple inheretence, I suppose u could say that there are cases where multiple inheritence can cause problems.
Consider the case where u inheret from the same class twice in this case the methods inhereted from the parent class will be overloaded and it will not be clear as to which method is being called.
though you could implement multiple in heretence in the child class using containment by creating handles to the parents(source)and then overloading the desired methods by dummy methods which call the parent class method using the handle u created.
hope this helps.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Java in General (intermediate), as neither of the two topics are remotely related to Threads, or to each other...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!