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 the difference between method overriding and overloading?
What is java developer skills?
How to provide security in java
What is the difference between stringbuffer and stringbuilder class?
What is java util concurrentmodificationexception?
How can you share data between two thread in Java?
What are the differences between heap and stack memory in java?
Is array size fixed in java?
What are the 7 types of characters?
What best practices should you follow while writing multithreaded code in java?
What is a conditional equation?
What is an exception? difference between Checked and Unchecked exception in Java
What are different types of arrays?
What is bufferedreader in java?
Can variables be used in java without initialization?