What will be the result of attempting to compile and run the following program?() public class Q28fd { public static void main(String args[]) { int counter = 0; l1: for (int i=10; i<0; i--) { l2: int j = 0; while (j < 10) { if (j > i) break l2; if (i == j) { counter++; continue l1; } } counter--; } System.out.println(counter); } }
- A、The program will fail to compile.
- B、The program will not terminate normally.
- C、The program will write 10 to the standard output.
- D、The program will write 0 to the standard output.
- E、The program will write 9 to the standard output.
正确答案:A
答案解析:有
微信扫一扫手机做题