本帖最后由 汪冰伦 于 2015-10-23 20:27 编辑
希望有老师或者同学帮忙看看,最好给出思路,谢谢了!
public class ThisConstructorCall {
public ThisConstructorCall(String s) {
System.out.println("s = " + s);
}
public ThisConstructorCall(int i) {
this("i = " + i);
}
public static void main(String args[]) {
new ThisConstructorCall("String call");
new ThisConstructorCall(47);
}
}
A、s = String call
s = i = 47
B、String call
s = i
C、s = String call
i = 47
D、String call
s = i = 47 |
|