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
How do you reverse a word in java?
How can I right-justify a string?
What is final access modifier in java?
What is boolean query?
What does java final mean?
Why can we not override static method?
Why arraylist is used in java?
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
How to create packages in java?
What is an eror in java?
What are the approaches that you will follow for making a program very efficient?
Explain about the performance aspects of core java?
What are voids?
Difference between method overloading and overriding.
What are the steps involved to create a bean?