• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple inheritance

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two unrelated questions would work better in two separate posts - the converstion is less confusing that way. But anyway, to answer your second question:
What other user interface are you considering? Swing and awt are the only ones available in Java, so their big advantage over other interfaces is: they work in Java, and you get all the advangtages that Java offers. If you're asking why is swing better than awt - basically, swing has a lot more options. Further details are possible if you clarify your question.
 
reply
    Bookmark Topic Watch Topic
  • New Topic