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 subsequence of a string?
What data type is true or false?
What is bubble sort in java?
What is an image buffer?
Can I declare a class as private?
What is starvation?
What are wrapper classes in java?
What are the differences between path and classpath variables?
What is the purpose of static methods and static variables?
What is a copy constructor in java?
What is difference between static and final?
Is object a data type in java?
Is namespace same as package in java?
What is the purpose of extern variable?
What is the exact difference in between Unicast and Multicast object? Where will it be used?