单选题:请阅读下面的程序
请阅读下面的程序
public class Example {
public static void main(String[] args) {
int x = 1;
do {
x++;
} while (x <= 4);
System.out.println("x = " + x);
}
}
程序的运行结果是()
A.3
B.4
C.5
D.6
答案:C
public class Example {
public static void main(String[] args) {
int x = 1;
do {
x++;
} while (x <= 4);
System.out.println("x = " + x);
}
}
程序的运行结果是()
A.3
B.4
C.5
D.6
答案:C