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
How the interruptible method gets implemented?
What is set string?
Can we create object of inner class in java?
When we should use serialization?
Which one will take more memory: an int or integer?
what is object slice?
What is difference between length and length() method in java ?
Write a program in java to create a doubly linked list containing n nodes.
What is prefix of a string?
How objects of a class are created if no constructor is defined in the class?
How many times finalize method will be invoked? Who invokes finalize() method in java?
How do you identify if jvm is 32-bit or 64-bit from java program?
How big is a 64 bit float?
Explain the significance of listiterator.
What is public static void main?