- 最後登錄
- 2019-10-16
- 在線時間
- 4211 小時
- 註冊時間
- 2009-1-17
- 閱讀權限
- 95
- 精華
- 0
- UID
- 5666829
- 帖子
- 29
- 積分
- 1510 點
- 潛水值
- 35140 米
| 回覆中加入附件並不會使你增加積分,請使用主題方式發佈附件。 請好心的各位順便說明一下
public class Test02 {
int a = 100, b = 200, c = 300;
public Test02(int r, boolean b) {
if(b != false) {
init();
}
getB(r);
}
private void init() {
a = 111;
b = 222;
c = 333;
}
public int getB(int r) {
a = a * r;
init();
b = a * r;
c = c - b - a;
return b;
}
public int getC() {
return c;
}
}
public class Test01 {
Test02 ts02;
public Test01() {
ts02 = new Test02(10, true);
int b = ts02.getB(5);
int c = ts02.getC();
b = ?, c = ?;
}
} | ... |
|