Please tell me how do I call a constructor.
this() must be call the first line in constructor.
class B{
int x;
B()
{
this(1);
System.out.print(“a[i]”);
}
B(int x) {
this.x=x; System.out.print(x);
}
}
class A{
public static void main(String args[]) {
B ob=new B();
}
}