问题:
现有:
class Cat {
Cat(int c) { System.out.print("cat" + c + " "); }
}
class SubCat extends Cat {
SubCat(int c) { super(5); System.out.print("cable "); }
SubCat() { this(4); }
public static void main(String [] args) {
SubCat s = new SubCat();
}
}
结果为:()
A . cat5
B . cable
C . cable cat5
D . cat5 cable
现有:
class Cat {
Cat(int c) { System.out.print("cat" + c + " "); }
}
class SubCat extends Cat {
SubCat(int c) { super(5); System.out.print("cable "); }
SubCat() { this(4); }
public static void main(String [] args) {
SubCat s = new SubCat();
}
}
结果为:()
● 参考解析
本题暂无解析
相关内容
相关标签