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
explain the concept of virtual method invocation in polymorphism in detail?
What are the different collection views provided by maps?
What is singleton class in ruby?
What are the common uses of "this" keyword in java ?
What is contractor means and methods?
What is jpa specification?
How do you implement singleton class?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
What is generics in java interview questions?
What is the difference between math floor and math round?
What is method in java with example?
How to instantiate static nested classes in java?
What is merge sort in java?
Which collections are thread safe in java?
What is a key in java?