It does nothing useful. It declares a local variable "x" with an initial value, and then that variable goes immediately out of scope when the code reaches the } at the end of the block. It doesn't change the real static variable "x" at all. If it were up to me, I'd have the compiler issue a warning when it saw something like this. [ September 04, 2002: Message edited by: Ron Newman ]
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Joined: Mar 22, 2002
Whoops! Ron is right... I overlooked the int declaration inside the block. My bad.