这段代码的运行结果?疑惑,找正解.....
知道的请解释一下为什么?public class Test {
public Test() {
}
public static void main(String[] args)
{
new B();
}
}
class A
{
static int aa=10;
int bb=9;
static{
System.out.println(aa);
}
A()
{
System.out.println(aa+","+bb);
a();
}
void a()
{
System.out.println(aa+","+bb);
}
}
class B extends A
{
int bb=7;
B()
{
super();
super.a();
System.out.println(aa+","+bb);
a();
}
void a()
{
System.out.println(aa+","+bb);
super.a();
}
static int aa=8;
static{
System.out.println(aa);
}
}
[[it] 本帖最后由 koman 于 2008-2-14 20:55 编辑 [/it]]