问题:
public class ForBar {
public static void main(String args) {
int i = 0, j = 5;
tp: for (;;) {
i ++;
for(;;)
if(i > --j) break tp;
}
system.out.printIn(“i = ” + i + “, j = “+ j);
}
}
What is the result? ()
A . The program runs and prints “i=1, j=0”
B . The program runs and prints “i=1, j=4”
C . The program runs and prints “i=3, j=4”
D . The program runs and prints “i=3, j=0”
E . An error at line 4 causes compilation to fail.
F . An error at line 7 causes compilation to fail.
public class ForBar {
public static void main(String args) {
int i = 0, j = 5;
tp: for (;;) {
i ++;
for(;;)
if(i > --j) break tp;
}
system.out.printIn(“i = ” + i + “, j = “+ j);
}
}
What is the result? ()
● 参考解析
本题暂无解析