在给定的代码中,为什么迭代中未捕获到 加法的结果?为什么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