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 / ajay dhingra
It will run fine with no exception here is the example :
public class CheckException extends Thread{
public CheckException(){
super.start();
this.start();
}
@Override
public synchronized void start() {
// TODO Auto-generated method stub
super.start();
}
}
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
What are the differences between stringbuffer and stringbuilder?
What are daemon Threads in java?
What is the instance of an object?
What do you understand by weak reference?
What are the main uses of this keyword?
Does set allows null in java?
What is classpath?
Why java is said to be pass-by-value ?
what is the swingutilities.invokelater(runnable) method for? : Java thread
What is the difference between numeric and integer?
What is an example of declaration?
Why put method is used?
Difference between stack and queue?
Explain the difference between the public, private, final, protected, and default modifiers?
what is the difference between the methods sleep() and wait()? : Java thread