Is multiple inheritance allowed in Java ? Why

Showing Answers 1 - 1 of 1 Answers

joy

  • Aug 8th, 2005
 

multiple inheritance is not allowed in java because to avoid naming collisions. 
ex:- if a class inherit two classes and let the two parent(base) classes have a method with same name. then child class will inherit only one of them , a naming collision occurs. 
in java multiple inheritance is achieved by using interfaces( because interface have all abstract methods) 
-joy(joy_me_myself@yahoo.com)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions