Is multiple inheritance used in Java

Showing Answers 1 - 2 of 2 Answers

RIT

  • Aug 4th, 2005
 

yes.. 
multiple inheritance used in Java but in the case of the intefaces[B] . 
 
public class ABC aextends XYZ implements abc, pqr, xyz

  Was this answer useful?  Yes

yogeshpanda

  • Sep 22nd, 2005
 

Initially it didnt as java uses "extends" word for inheritance but it didnt allow us to extend more then one class.So the concept of "interface" came which is like abstrct class but with strictness that methods will only be declared at that place & have to be defined in inheriting class.So we can say that interface is the key to multiple interface.Ex. class A{........}class B{..............}For multiple interface can't useclass C extends A , B{.....}It is not supported as extends is used for single inheritance.For multiple inheritance usepublic interface D{......}class C extends A implements D{.....}

  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