Hi to all..
I am getting the compilation error when I called the one argument constructor from the zero argument constructor.. why ?
public class testCon
{
public static void main(
String [] args )
{
testCon t=new testCon(2);
t.call1();
}
void call1()
{
call2();
// line 10 }
void call2()
{System.out.println("call2");}
testCon()
{ testCon(2);
// line 13 }
testCon(int x)
{ System.out.println(x); }
}
Out put :
>
java testCon
2
call2
Why I am getting the compilation error at line 13 why not at line 10.
Please explain me If any one had Idea..
thanks in advance..
Ishmayel.