This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes asking about interface 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "asking about interface 2" Watch "asking about interface 2" New topic
Author

asking about interface 2

kumar abhay
Ranch Hand

Joined: Oct 02, 2001
Posts: 53
Question v:-Why multiple inheritance is is possible by interface rather than inheritance(by extends keyword).what is the purpose of introducing interface.what is that which we can not do in inheritance but in interface
Question vi:-Interface can not be protected but only public .why?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
Question v:-what is that which we can not do in inheritance but in interface

It is rather a question of what problems are eliminated by using interface rather than multiple inheritance.

Superficially, multiple inheritance looks attractive. However, having multiple superclasses means inheriting the implementation of each, which is problematic. Resolving conflicts among the multiple implementations can be difficult or impossible. If you don't think it's complex, look at the virtual base classes in C++.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: asking about interface 2
 
Similar Threads
Multiple inheritance and Multiple Interfaces
Polymorphism without inheritance
about thread and Runnable interface
Polymorphism
Use of Interface