why should the answer be option 4???
Question 53) � NU
Given the following class definition which of the following can be legally placed after the comment line
//Here ?
class Base{
public Base(int i){}
}
public class MyOver extends Base{
public static void main(
String arg[]){
MyOver m = new MyOver(10);
}
MyOver(int i){
super(i);
}
MyOver(String s, int i){
this(i);
//Here
}
}
1)MyOver m = new MyOver();
2)super();
3)this("Hello",10);
4)Base b = new Base(10); - C
Answer to Question 53)
4)Base b = new Base(10);
Any call to this or super must be the first line in a constructor. As the method already has a call to this, no more can be inserted.
Thanks in adv
Padmini