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
Why do we need variables?
Is array primitive data type in java?
Is char a method in java?
What is immutable state?
What is protected in java?
What is the default value of float and double datatype in java?
What is the declaration statement?
Can constructor return value?
Can we sort hashmap in java?
Is c better than java?
What is the purpose of static methods and variables?
What is null in java?
Can you extend singleton class?
What are the basics of core java?
Can a main method be declared final?