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 an image buffer?
What is linked hashset and its features?
In the below example, what will be the output?
What do you mean by composition in java?
What is string made of?
What is meant by object?
What is the difference between yield() and sleep()?
Why is java multithreaded?
Why do we use threads in java?
What is the importance of main method in Java?
What is immutable class in java?
What is a boolean expression in java?
What is the default value of an object reference declared as an instance variable?
Are functions objects in java?
Which types of exceptions are caught at compile time?