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 many types of the indexof method are there for strings?
Is break statement can be used as labels in java?
How do generics work?
define polymorphism in java
What is a substitution variable?
What is the size of boolean variable?
What is a pointer and does java support pointers?
What is difference between class and object in java?
What is a numeric literal?
How do you use parseint in java?
What is polymorphism in java? What are the kinds of polymorphism?
Can you create an object of an abstract class?
Explain the scope or life time of class variables or static variables?
Does substring create a new object?
Where is java located?