A: 3
B: 4
C: 5
D: 6
举一反三
- 请阅读下面的程序 public class Example { public static void main(String args) { int x = 1; do { x++; } while (x <;= 4); System.out.println("x = " + x); } } 运行程序后,下列选项中,哪一个是x的值。( ) A: 3 B: 4 C: 5 D: 6
- 请阅读下面的程序 public class Example { public static void main(String[] args) { int x = 1; do { x++; } while (x <= 4); System.out.println("x = " + x); } } 程序的运行结果是()
- 请阅读下面的程序 public class Example { public static void main(String[] args) { int x = 1; do { x++; } while (x <= 4); System.out.println("x = " + x); } } 运行程序后,下列选项中,哪一个是x的值() A: 3 B: 4 C: 5 D: 6
- 请阅读下面的程序 public class Example { public static void main(String[] args) { int x = 1; do { x++; } while (x <= 4); System.out.println("x = " + x); } } 运行程序后,下列选项中,哪一个是x的值
- 请阅读下面的程序public class Example {public static void main(String[] args) {int x = 1;do {x++;} while (x <= 4);System.out.println("x = " + x);}}程序的运行结果是( ) A: x=3 B: x=5 C: x=6 D: x=4
内容
- 0
请阅读下面的程序 public class Example03 { public static void main(String args) { int x = 3; if (x > 5) { System.out.println("a"); } else { System.out.println("b"); } } } 程序的运行结果是()
- 1
请阅读下面的程序 public class Test { public static void main(String[] args) { for(int x = 0 ; x <=3 ; x++){ continue; System.out.print(x%2+” “); } } } 下列选项中,哪一个是程序的运行结果
- 2
请阅读下面的程序 public class Test { public static void main(String[] args) { int x; int y; for (x = 1, y = 1; x <= 100; x++) { if (y >= 20) { break; } if (y % 3 == 1) { y += 3; continue; } y -= 5; } System.out.println(“x=” + x + “,y=” + y); } } 下列选项中,哪一个是程序的运行结果( )
- 3
请阅读下面的程序 public class Example03 { public static void main(String args) { int x = 3; if (x >; 5) { System.out.println("a"); } else { System.out.println("b"); } }} 程序的运行结果是() A: true B: false C: a D: b
- 4
请阅读下面的程序 public class Example03 { public static void main(String args) { int x = 3; if (x > 5) { System.out.println("a"); } else { System.out.println("b"); } }} 程序的运行结果是() A: true B: false C: a D: b