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

What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

698


Can we force garbage collector to run ?

578


How do you convert an int to a double in java?

606


What is java objectoutputstream?

551


What is nested interface?

529






How can I right-justify a string?

637


What is byte data type?

556


What is treeset in java collection?

533


How do you add an element to a set in java?

506


What is better - 'bit-shift a value' or 'multiply by 2'?

709


What is meant by null and void?

551


What is json parser in java?

626


What mechanism does java use for memory management?

504


What is a boolean field?

535


What is difference between word and integer?

610