日期:2014-05-18 浏览次数:20717 次
class A
{
{
System.out.println("A类语句块");
}
public A()
{
System.out.println("A类无参构造函数");
}
public A(int i)
{
this();
System.out.println(i);
}
}
class B extends A
{
{
System.out.println("B类语句块");
}
public B()
{
super(10);
System.out.println("B类无参构造函数");
}
}
public class Test
{
public static void main(String[] args)
{
new B();
}
}