Yes.
所在版块:求学狮城 发贴时间:2004-07-01 08:22

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
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.
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Flying @way 吳穎暉
 相关帖子 我要回复↙ ↗回到正文
问几个java问题 bigfox   (946 bytes , 623reads )
ur mails...got a lot...how? 小蹦   (0 bytes , 230reads )
really? help me pass them to 阿修罗 bah 3x 3x bigfox   (0 bytes , 369reads )
只要不是来自PR/UOB, 就不是很急. bigfox   (69 bytes , 303reads )
java tutorial from Sun is always a good resource to consult 香陵居士   (591 bytes , 281reads )
What's SCJP? Flying   (58 bytes , 290reads )
not suit for u at all. bigfox   (86 bytes , 369reads )
That's it lo... there are always long staircases to climb... Flying   (0 bytes , 277reads )
Hoho, if you are good enough to get SCEA, can got for it directly. ;) 香陵居士   (0 bytes , 229reads )
Answers: Flying   (944 bytes , 294reads )
are u saying that bigfox   (150 bytes , 401reads )
Yes. Flying   (582 bytes , 268reads )