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

Which graphs are functions?

728


What is the maximum size of array in java?

755


What are the types of exceptions?

810


How do you write a good declaration?

714


Is singleton class thread safe?

763


What is numeric data type?

761


What are "methods" and "fields"?

788


Is there any limitation of using inheritance?

822


Can you override private or static method in java?

769


What is a line break?

819


when you will synchronize a piece of your code? : Java thread

768


What is generic type?

809


Can we use string in the switch case?

813


What are the advantages of functions?

722


What is an argument java?

733