A(String name)
{
this.name = name;
System.out.println("A");
}
}
class B extends A
{
B(String name)
{
super(name);
System.out.println("B");
}
}
class C extends B
{
C(String name)
{
super(name);
System.out.pritnln("C");
}
}
class ExtendsDemo3
{
public static void main(String[] args)
{
C c = new C("name");
}
}
这就调用的A类的构造方法:
结果为: A B C; 作者: Leo_yeung 时间: 2013-8-15 21:05