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


Please Help Members By Posting Answers For Below Questions

Why java is considered as platform independent?

782


What are static blocks and static initalizers in java ?

779


Does constructor return any value?

787


What is the buffer limit?

767


What is an example of a keyword?

774


What is stream api in java8?

782


What is meant by javabeans?

825


What is method overloading and method overriding?

765


What is finalize()?

877


Is class is a data type?

806


Is string passed by reference in java?

766


What is keyset in java?

843


How a string is stored in memory?

791


What is a dynamic array in java?

800


What are constants and how to create constants in java?

755