why java does not support multiple inheritance
Answer Posted / lalit sonje
There is another form of inheritance called as multiple
inheritance. This is not supported by java. The authors of
the java language took a design decision to compromise
multiple inheritance with interfaces, the specifics of this
decision may be covered in other sources. Practically,
multiple inheritances is difficult because of the
ambiguities, it can be created when a class inherits from
two super classes with the same method signature.
But there is a workaround for this problem. Java allows us
to achieve partial multiple inheritance using interfaces. A
class can implement any number of interfaces and provide
implementations for them and achieve partial multiple
inheritance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a jit compiler?
Is java 1.7 the same as java 7?
What is the list interface?
What is boolean flag in java?
Explain access modifiers in java.
What is square root in java?
What is command line argument
What is unicode used for?
What is jrmp?
what is a thread pool in java and why is it used?
Why does java have two ways to create child threads?
how we can make a write-only class in java?
What is purpose of find feature?
What is the difference between overriding and overloading in OOPS.
Difference between predicate, supplier and consumer ?