public class Pet{ private String name; public Pet(){ System.out.print(1); } public Pet(String name){ System.out.print(2); } } public class Dog extends Pet{ public Dog(){ System.out.print(4); } public Dog(String name){ this(); System.out.print(3); } } 执行new Dog(“棕熊”);后程序输出是哪项?()
- A、 143
- B、 423
- C、 243
- D、 1134
正确答案:A
答案解析:有
微信扫一扫手机做题