Why java doesn't support multiple Inheritence ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. Why java doesn't support multiple Inheritence ?Core Java
Ans. class A {
void test() {
System.out.println("test() method");
}
}

class B {
void test() {
System.out.println("test() method");
}
}

Suppose if Java allows multiple inheritance like this,

class C extends A, B {
}

A and B test() methods are inheriting to C class.

So which test() method C class will take? As A & B class test() methods are different , So here we would Facing Ambiguity.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   inheritence   multiple inheritence     Asked in 1 Companies      basic        frequent


Related Questions

  What are points to consider in terms of access modifier when we are overriding any method?
  Why every object constructor automatically call super() in Object before its own constructors?
  How compiler handles the exceptions in overriding ?
  what is covariant return type?
  Are constructors inherited? Can a subclass call the parent's class constructor? When?
  Difference Between this() and super() ?
  Can we reduce the visibility of the inherited or overridden method ?
  Does a class inherit the constructor of its super class?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: