标签: java initialization
在Java中,为什么A类可以,但B类有编译错误?
class A { {a=4;} int a; } class B { {System.out.println(a);}//error: Cannot reference a field before it is defined int a; }