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
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
What is double checked locking in singleton?
What is udp in java?
Why do we need array in java?
What is bubble sorting in java?
What is java lang string?
Explain about sets?
How java is similar to c?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
What are the topics in advance java?
What does indexof return in java?
Does java support Operator Overloading?
What is the default size of arraylist in java?
Can memory leak in java?
Whats the difference between notify() and notifyall()?