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
which class is the wait() method defined in? : Java thread
What is <> used for in java?
What is the null?
Can I learn java without any programming experience?
What are constants?
How do you do descending order in java?
How do you do a line break in java?
Are arrays immutable in java?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
Which arithmetic operations can result in the throwing of an arithmeticexception?
What is the difference between math floor and math round?
What are the advantages and disadvantages of object cloning?
What class allows you to read objects directly from a stream in java programming?
What are the 4 versions of java?
What is private static in java?