package demo; public class A { public A (){ System.out.println("fu lei gou zao qi"); test(); } public void test(){ test(); System.out.println("fu lei test"); } } class B extends A{ private String name="AAAA"; public void test(){ System.out.println("zi lei test"+name); } } class c{ public static void main(String[] args) { B b=new B(); }
}
-----------------
fu lei gou zao qi zi lei testnull