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 nextint java?
What is a qualifier in a sentence?
I want to print “hello” even before main is executed. How will you acheive that?
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.
From the two, which would be easier to write: synchronization code for ten threads or two threads?
What is method overloading and method overriding?
What is difference between add() and addelement() in vector?
What is the difference between stored procedure & function?
How do you clear a method in java?
What is difference between module and function?
Can we declare main () method as non static?
How to sort an array in java without using sort method?
Why is java called the platform independent programming language?
How do you create a first line indent?
Enlist diffrent types of inheritance supported by java?