package com.my.testpaper;
public class StaticStuff {
static int x = 10;
static {
x += 5;
}
public static void main(String[] args) {
System.out.println("x = " + x);
}
static {
x /= 3;
}
}
在8,10,12这三行大断点
debug调试,跳转的顺序是8->12->3->10