62,628
社区成员
发帖
与我相关
我的任务
分享
public class Question1 {
//static int a = 1;
static {
a = 3; //此处永不报错
System.out.println(a); //当静态变量定义在下面时报错:Cannot reference a field before it is defined
}
static int a = 1;
public static void main(String[] args) {
}
}