public class Test {
public static Test t1 = new Test();
{
System.out.println("a");
}
static
{
System.out.println("b");
}
public static void main(String[] args) {
Test t2 = new Test();
}
}
代码如上,执行结果是aba。请各位大神解释下为什么!!!
public static Test t1 = new Test();
{
System.out.println("a");
}
static
{
System.out.println("b");
}
public static void main(String[] args) {
Test t2 = new Test();
}
}
代码如上,执行结果是aba。请各位大神解释下为什么!!!