class cast1
{
int x=29;
public static void main(
String args[])
{
int x=234;
//byte ch2 = (byte)i2;
this.x=23;
System.out.println(args[2]);
System.out.println("x=" + x + "this.x"+ this.x);
}
}
15)the above program on compilation gives " undefined variable this"
can anyone tell me what all are the places where "this" can be used
I know why it is used in constructor but sometimes it is used in methods also
so tell me what are the restrictions for it wwhen w use it in merthod
can it be used in static methods,main methods...