在給定的代碼中,爲什麼迭代中未捕獲到 加法的結果?爲什麼x的價值從不改變?爲什麼添加的結果沒有在迭代中捕獲?
public class Fortran {
static int bump(int i) { return i + 2; }
public static void main(String[] args) {
for(int x = 0; x < 5; bump(x))
System.out.print(x + " ");
}
}
更改短寫在你的語句讀取X =凸(x)的最後一行。你沒有捕獲結果。 – sircodesalot