题目内容

This type of loop will always be executed at least once.将始终至少执行一次的循环是?

A. pre-test loop先测试循环
B. post-test loop后测试循环
C. sentinel loop 设定值循环
D. for loopfor循环

查看答案
更多问题

If you are using a block of statements, don’t forget to enclose all of the statements in a set of:如果要使用的是一个语句块,请不要忘记将所有语句放在哪里?

A. Braces大括号
B. Double quotes双引号
C. Semicolons分号
D. Parentheses括号

What will be the value of x after the following code is executed?执行以下代码后,x的值是什么?int x = 10;while (x < 100){x += 10;}

A. 90
B. 100
C. 110
D. This is an infinite loop这是一个死循环/无限循环

现有:class TestApp {public static void main(String[] args) {for (int i = 0; i < 10; i++) {if (i == 3)break;System.out.print(i);}}}程序运行后的输出是哪项?

A. 0123
B. 012456789
C. 0123456789
D. 012

现有:class TestApp {public static void main(String[] args) {int[] myarray = { 10, 11, 12, 13, 14 };int sum = 0;for (int x : myarray)sum += x;System.out.println("sum= " + sum);}}上述程序运行后的结果是哪项?

A. sum=10
B. sum=70
C. sum=60
D. 运行时抛出异常

答案查题题库