一、继承条件下的构造方法的调用
class Grandparent { public Grandparent() { System.out.println("GrandParent Created."); } public Grandparent(String string) { System.out.println("GrandParent Created.String:" + string); } } class Parentt extends Grandparent { public Parentt() { super("Hello.Grandparent."); System.out.println("Parent Created"); // super("Hello.Grandparent."); } public Parentt(String s) { System.out.println("Parent Created.String:"+s); } } class Childd extends Parentt { public Childd() { super("Hello.Parent."); System.out.println("Child Created"); } } public class TestInherits { public static void main(String args[]) { Childd c = new Childd(); } }