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 if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Can we force garbage collector to run ?
How do you convert an int to a double in java?
What is java objectoutputstream?
What is nested interface?
How can I right-justify a string?
What is byte data type?
What is treeset in java collection?
How do you add an element to a set in java?
What is better - 'bit-shift a value' or 'multiply by 2'?
What is meant by null and void?
What is json parser in java?
What mechanism does java use for memory management?
What is a boolean field?
What is difference between word and integer?