What is the reason that multiple inheritance is not possible
in java??
Answer / gayathri
This is to avoid "Diamond problem"....Lets say there are 4 classes A,B,C,D..A is a superclass...The two classes B and C inherit from A, and class D inherits from both B and C. If a method in D calls a method defined in A (and does not override the method), and B and C have overridden that method differently, then from which class does it inherit: B, or C? ...To avoid this issue, Java dint allow multiple inheritance..
Having said that, also note that Java allows multiple inheritance through multiple interface implementation
| Is This Answer Correct ? | 10 Yes | 1 No |
Difference between notify() method and notifyall() method in java?
What is tochararray in java?
what is function overloading in java?
0 Answers Tavant Technologies, TCS, Virtusa,
Which characters are allowed to use as the second character of an identifier, and which characters are not allowed?
What is an abstract class and what is it’s purpose?
Explain about instanceof operator in java?
What are predicates in java 8?
Explain java heap space and garbage collection?
What are the two categories of data types in the java programming language?
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?
If a class is declared without any access modifiers, where can the class be accessed?
What is methods in java?