why java does not support multiple inheritance

Answers were Sorted based on User's Feedback



why java does not support multiple inheritance..

Answer / neeraj kumar singh

in multiple inheritance there are a number of base class so
when ever we use super keyword to call any method then
compiler do not recognize the base class form which property
and method have to use.since there is only one way to call
base class method and property which is super keyword. so
because of super keyword, java do not support multiple
inheritance but it is possible with help of interface.

Is This Answer Correct ?    0 Yes 1 No

why java does not support multiple inheritance..

Answer / jitesh singh

java support multiple inheritance though multiple interface inheritance but multiple interface inheritance allows an object to inherit many different method signatures with the warning that the inheriting object must implement those inherited methods.Thus,The inheriting object just doesn't get an implementation free ride.

Is This Answer Correct ?    0 Yes 1 No

why java does not support multiple inheritance..

Answer / deepak garg

multiple inheritence are simply use in java but if we use
this facility to java we are face to a mixup problem
because same name same argument confusion create and so we
are not use in multiple inheritence.

Is This Answer Correct ?    1 Yes 3 No

why java does not support multiple inheritance..

Answer / anoop

java do not support virtual keyword ,therefore direct
multiple inheritance is not supported in java

Is This Answer Correct ?    0 Yes 2 No

why java does not support multiple inheritance..

Answer / rajib

class ConcreteClaNm extends SuperClass{}
or
class ConcreteClaNm extends IncompleteClass{}
hense java does not support multiple inheritance.
or
class IncompleteClass extends ConcreteClaNm{}
But
class ConcreteClaNm implements interface1,interface2....
{
}
or
class IncompleteClass implements interface1,interface2....
{}

public interface InterName extends InterName1,InterName2...
{}

We achive single inheritance and multiple inheritance like this.

Is This Answer Correct ?    0 Yes 4 No

why java does not support multiple inheritance..

Answer / devesh dashora

Basically multiple inheritance is useful only in
polymorphism, so in java it can be done by interfaces, so
that java doesn't need to provide multiple inheritance
using extends keyword.

Is This Answer Correct ?    22 Yes 34 No

why java does not support multiple inheritance..

Answer / ouali international

Multiple inheritance in Java is not allowed directly simply
because Java has another concept of Interfaces that replace
the ambiguity of this problem in other OOP languages such
as C++.

Is This Answer Correct ?    9 Yes 23 No

why java does not support multiple inheritance..

Answer / reshma mittal

java does not support multiple inheritance because in java
we can develop web based application
suppose we r trying 2 download a file that has extended
many classes if 995 of classes get downloaded and even 1%
gives error in downloading then there is no use of
downloading

that's why java avoid such comlexities of interdependency
so it avoid multiple inheritance

Is This Answer Correct ?    2 Yes 16 No

why java does not support multiple inheritance..

Answer / sskur

Java was designed without multiple inheritance.Java
interfaces solves most problems that are commonly solved
using multiple inheritance just simulates inheritance .

Kalaivani , Kishore don't misguide others unless your
absolute with your answers.

Is This Answer Correct ?    40 Yes 72 No

why java does not support multiple inheritance..

Answer / lalatendu

Because in java a class doesn't extend more than one class

Is This Answer Correct ?    22 Yes 96 No

Post New Answer

More Core Java Interview Questions

What is == and === in javascript?

0 Answers  


In Inheritance if we are implementing Multi level inheritance and all class having same name of variable and now i want to access each class variable and how it is possible?

2 Answers  


What's the purpose of using break in each case of switch statement?

0 Answers  


what is data binding? give the example

1 Answers   TCS,


What is collections framework?

0 Answers  


Can we have static methods in an interface?

0 Answers  


Explain the public class modifier?

0 Answers  


Is hashset ordered java?

0 Answers  


What is a memory leak in java?

0 Answers  


How to call one constructor from the other constructor ?

0 Answers  


What is sortedmap interface?

0 Answers  


What is difference between class and object in java?

0 Answers  


Categories