两个小示例

demo1

package containers;

public class TempTest {
    static{
        a= 1;
//        System.out.println(a);
    }
    
    static int a= 0;
    
    public static void main(String[] args) {
        Utilities.println(a);
    }
}

demo2

package containers;

public class TempTest2 {
    static int a = 1;

    static {
        a = 0;
    }

    public static void main(String[] args) {
        Utilities.println(Integer.valueOf(a));
    }
}

参考反编译文件

posted on 2016-05-23 19:20  WesTward  阅读(183)  评论(0编辑  收藏  举报