are u saying thatany var(s) declared within static{} will not be reachable any more after the control flow gets out of that block?
pls correct me if i am wrong. 3x :D
Yes.
Static initializer blocks behave like static methods in the class, with all method names, argument lists, and return types stripped.
All static initializers declared in a class are executed exactly once, in the order of their declarations, when the class is first loaded. Therefore, static initializer are popular when you need to initialize static class member variables with logic that exceeds what a single-line expression initializer can do.
Therefore, with the basic scoping rule, I suppose local variables should not be accessible from outside of a static initializer block.
All static initializers declared in a class are executed exactly once, in the order of their declarations, when the class is first loaded. Therefore, static initializer are popular when you need to initialize static class member variables with logic that exceeds what a single-line expression initializer can do.
Therefore, with the basic scoping rule, I suppose local variables should not be accessible from outside of a static initializer block.