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
Which graphs are functions?
What is the maximum size of array in java?
What are the types of exceptions?
How do you write a good declaration?
Is singleton class thread safe?
What is numeric data type?
What are "methods" and "fields"?
Is there any limitation of using inheritance?
Can you override private or static method in java?
What is a line break?
when you will synchronize a piece of your code? : Java thread
What is generic type?
Can we use string in the switch case?
What are the advantages of functions?
What is an argument java?