Why does java doesnot support multiple inheritance?
Answer Posted / msraju
Every class in java must have only one root class (i.e
Object class) directly or indirectly.
If Class C extends Class A and Class B(this approach is not
supported in java ),here Class A will one root Object
class,similarly Class B will have Another root class.i.e
Here Class C is having two root classes....For this reason
java not supporting Multiple inheritance with respective
Objacts.
Every objects need some common functionalities which are
available in Object class.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How does enum work in java?
Explain different types of thread priorities ?
What is the purpose of interface?
What are the two ways in which thread can be created?
Can we sort hashset in java?
Can a method be static?
Why is boolean important?
What are the two types of streams offered by java 8?
What is bom encoding?
How many bytes is a string java?
How do you declare a variable?
What is polymorphism in java? What are the kinds of polymorphism?
List the features of java programming language.
What is the role of garbage collector in java?
What are data structures in java?