被顺序调用?请选择输出结果 ( )class People { String name; public People() { System.out.print(1); } public People(String name) { System.out.print(2); this.name = name; } } class Child extends People { People father; public Child(String name) { System.out.print(3); this.name = name; father = new People(name + ":F"); } public Child(){ System.out.print(4); } }public class Test{ public static void main(String[] args){ People p = new Child("梅西"); }}
发布时间:2024-04-03 13:42:53