Why single inheritance cannot be use in java/why we alwayz use multiple inheritances?

Showing Answers 1 - 3 of 3 Answers

Renjith T V

  • Jun 25th, 2006
 

Single inheritance, multilevel inheritance and hierarchial inheritance is allowed in java. Muliple inheritance and hybrid inheritance is not allowed because implementing these in Java will cause data duplication and ambiguity. The derived class objects created in the static main method will not know from which base class method is being overrided in the derived class. In C++, we can achieve solution against data duplication. Scope resolution operator in C++ is another solution.

  Was this answer useful?  Yes

sandhya

  • Apr 1st, 2007
 


     please dont create confusion in java we have single inheritance but not multiple inheritance and multiple inheritance can be accomplished by multiple interface inheritance in java

  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