Why java does not support multiple inheritence?2.what is the difference b/w structures and classes?

This question is related to Wipro Interview

Showing Answers 1 - 3 of 3 Answers

himani

  • Jul 27th, 2007
 

1. Because Java we cannot extend two classes in a derived class therefore we use interface to solve this problem.


2. Classes is used for object oriented language. so, each class has its own one or more object. but in structure nt call with the help of objectand also we can define function but not in sturcture.

arunMkumar

  • May 29th, 2008
 

No,himani

       We can declare n define the functions in structures in OOP ..  actually v cannot  produce constructors n destructors for structures n v cannot apply the OOPS concepts in structurs..

  Was this answer useful?  Yes

jeraldtg

  • Nov 9th, 2010
 

If multiple class have method of same name then it will interfere eachother so the compiler has the difficulty of giving priority to the method. To overcome this problem Java dosen't support multiple inheritance. For multiple inheritance it uses interfaces

  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