in a constructor what happen if u call super and this in
the same class? i know that it is not possible to call
both in the same one? if we call what will happen?
Answer Posted / agile being
The question clearly specifies "what happen if u _CALL_
super and this in the same class"
By call, probably, they mean:
this(); /*Invoking the constructor*/
super(); /*Invoking the parent class's constructor*/
I think the right answer is that it will raise a compiler
exception. Such a program will not compile.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Why deletion in linkedlist is fast than arraylist?
why we use merge option in hybernate pls give a ex snippet
What is the use of string and stringbuffer?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
What state does a thread enter when it terminates its processing in java programming?
How to create com object in Java?
How many threads can java run?
State some advantages of java?
What are different ways of object creation in java ?
What does indexof return in java?
What is difference between an object and a class?
What is the difference between checked exception and unchecked exception?
Explain different forms of polymorphism?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
Why java uses the concept of the string literal?