java puzzle aditya#1
By veladitya
@veladitya (82)
India
February 20, 2007 2:06am CST
public class X
{
X()
{
System.out.println("welcome to the world of MYLOT");
}
private int X;
public static void main(String args[])
{
X X=new X();
String X1="10";
System.out.println(X1);
}
}
Wht is the output...whether it gives the compilation eror's or runtime error or anyother? All the best
3 responses
@JollySelva (69)
• India
1 Mar 07
welcome to the world of MYLOT
10
Above is the output for ur puzzle. right?
1 person likes this
@veladitya (82)
• India
21 Feb 07
Ho.Sory My friend...
Check Once whether X() is an method or an Constructor...
And try again all the best