why java does not support multiple inheritance
Answer Posted / shiva
multiple inheritance means a sub class which is derived from
two base classes.
assume that the two base classes has same methods with same
signature.
for eg we create an object for the base class.
now call the any one method of base class with sub class object.
now which method is going to execute?
To avoid this confusion java doesnot support multiple
inheritance.
| Is This Answer Correct ? | 22 Yes | 6 No |
Post New Answer View All Answers
What is a condition in java?
What is the main function in java?
What is the collection interface?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
What are the types of strings?
How do you compare two strings lexicographically?
What is the public field modifier?
Can a serialized object be transferred via network?
What are triggers in DB? Explain their types. How do they work?
Can You Have Virtual Functions In Java?
What is the difference between arraylist and hashset in java?
How infinite loop is declared?
Write a function to print Fibonacci series and Tribonacci series?
Can we inherit a class with private constructor?
Can you instantiate the math class?