why java does not support multiple inheritance
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Answer / lalatendu
Because in java a class doesn't extend more than one class
Is This Answer Correct ? | 22 Yes | 96 No |
What is the difference between checked exception and unchecked exception?
What is the purpose of the system class in java programming?
What is the old name of java?
What is the default value of float and double datatype in java?
What are meta-annotations?
What about main thread in java?
what is AWT
what is meant by encapsulation?
Is static a keyword in java?
How multipleInheritance is possible in java?
What is data type example?
what is session facade ?