This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Are non-static variables declared within a static method or static block, of any use by methods outside of that method or block? If not, why would they exist, other than to possibly be used when assigning a value to an actual static variable? Let me know what you think, Thanks, TM
Any variable declared in any method can only be used in that method (exception of local method classes). A variable declared in a static block is local to that block the same way that a variable declared in a method is local to that method.