给定如下一个Java源文件Child.java,编译并运行Child.java,会出现什么问题 classParent1 { Parent1(String s){ System.out.println(s); } } classParent2 extends Parent1{ Parent2(){ System.out.println("parent2"); } } publicclass Child extends Parent2 { public static void main(String[] args) { Child child = new Child(); } }
|