Originally posted by devesh singh:
#) lass wrapper
{
public static void main(String [] str)
{
static int l; // 1
Integer I = new Integer(6);
System.out.println(I);
System.out.println(l);
}
}
what is wrong withh this code if i removw line 1 then its all OK
Hi Devesh,
int l is a local variable to main(). Local variable cannot have any access modifier. If you remove 'static' declaration from int l, you will be okay. BTW, Don't forget to initialize l.
- Lam -
[This message has been edited by Lam Thai (edited May 14, 2001).]