why java does not support multiple inheritance
Answer Posted / vishwanath
java doesn't support multiple inheritance directly because it leads to overiding of methods when both extended class have a same method name. this will leads to ambiguity in executing. this problem can be solved using interface which works similar to the multiple inheritance but the methods are defined in the subsequent classes so it does not create any ambiguity.
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is the difference between checked exception and unchecked exception?
What is the meaning of I ++ in java?
What is field name?
What is multi level inheritance in java?
what is use of functional interface in java 8?
Define nashorn in java8.
How can we pass argument to a function by reference instead of pass by value?
How do you check whether the list is empty or not in java?
What is pass by value?
I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?
Difference between nested and inner classes ?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
List the features of java programming language.
What is string substring?
What is keyword and identifier?