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


Please Help Members By Posting Answers For Below Questions

What is the difference between checked exception and unchecked exception?

534


What is the meaning of I ++ in java?

611


What is field name?

591


What is multi level inheritance in java?

564


what is use of functional interface in java 8?

563






Define nashorn in java8.

570


How can we pass argument to a function by reference instead of pass by value?

588


How do you check whether the list is empty or not in java?

518


What is pass by value?

517


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

578


Difference between nested and inner classes ?

612


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

583


List the features of java programming language.

566


What is string substring?

563


What is keyword and identifier?

645