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 |
What is difference between classpath and path variables in java?
What is a Java switch statement, and how can it be used?
Which java ide is used the most?
What are MalformedURLException and UnknownHost Exceptions and whey they will be thrown?
What is the difference between declaration and definition in java?
whats the life cycle of jsp
I have one Shopping cart application, i that i have selected some items, while clicking submit button by mistake i have clicked twice or trice, that time items are selected twice or trice. Actually i want only one copy of items but its selected twice or trice. So how can we avoid this problem?
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?
What is bool mean?
How to perform Singleton of the java class object on multi JVM?
What all access modifiers are allowed for top class ?
1).what is the difference between below examples String s="vijay"; String s=new String("vijay");
12 Answers Mascon, Satyam, TCS,