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
Write a java program that prints all the values given at command-line.
What is a singleton class? Give a practical example of its usage.
How many types of gc are there in java?
List out benefits of object oriented programming language?
Do loops java?
How do you bind variables?
What is javac in java?
What is ide with example?
What is are packages?
What is literal example?
Can a class be declared as protected?
What is a protected class in java?
Is singleton class immutable?
Can a class have multiple subclasses?
What are the data types supported by java?