package test; public class SuperDemo { public static void main(String[] args) { Boo o=new Boo(); Coo c=new Coo(29); Doo d=new Doo(); } } class Coo{ Coo(int n){ n=n+1; System.out.println(n);//30 } } class Doo extends Coo{ Doo() { super(25);//调用父类的有参构造 这个就无用了?? } } class Aoo{ Aoo(){ System.out.println("超类的构造器"); } } class Boo extends Aoo{ Boo(){ super(); System.out.println("派生类的构造方法"); } }