Why does java doesnot support multiple inheritance?
Answer Posted / rathnakar
--> Java follows Super Class Object and Sub Class reference
at runtime to excute inherited and overridden methods.
--> Java doesnot support multiple inheritence by using
classes.becoz java compiler gets ambiguity if one method
is defined in many child classes. this happens due to
above reason
--> so execution fails . but it can be achieved using
interfaces. becoz it method over riding and every child
class is identified uniquely w.rt to interface.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is hasnext in java?
Why spring singleton is not thread safe?
Explain enumeration in java?
Can we assign integer value to char in java?
What is arraylist e?
how are methods defined?
Which is better stringbuffer or stringbuilder?
What is the transient keyword?
Can we create our own wrapper class in java?
Can you pass by reference in java?
How to do encapsulation in java?
Explain static nested classes ?
How objects are stored in java?
Why do we create threads in java?
What is the relationship between class and object?