Hi Vikas,
First, note that this forum is devoted to Sun Java Studio Creator IDE. General Java questions can be asked on forums here: http://forum.java.sun.com/
Second, note that static variable can be defined only as member of class. It cannot be defined inside of method.
Thanks, Misha
(Creator team)