Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java While循环构造_Java_While Loop - Fatal编程技术网

Java While循环构造

Java While循环构造,java,while-loop,Java,While Loop,你能解释一下吗?我在这个网站上查找数据 谢谢一个“布尔表达式”是一个返回布尔值的表达式(true或false)。术语“嵌套语句”是指while循环中的语句 例如: int x = 10; while (x > 0) { // x > 0 is an expression with a boolean result System.out.println(x); // nested statement 1 x--; // nested s

你能解释一下吗?我在这个网站上查找数据

谢谢

一个“布尔表达式”是一个返回布尔值的表达式(
true
false
)。术语“嵌套语句”是指while循环中的语句

例如:

int x = 10;
while (x > 0) { // x > 0 is an expression with a boolean result
   System.out.println(x); // nested statement 1
   x--;                   // nested statement 2
}

(这将在控制台上打印10、9..1)。

解释什么?您具体不了解什么?while循环的作用是什么?布尔表达式是什么意思?先生,您需要一些认真的教程和谷歌搜索(1)它执行嵌套语句,直到布尔表达式变为false。(2) 如果你问一些无关紧要的问题,你就不可能得到你想要的答案/回答。向你寻求帮助。
int x = 10;
while (x > 0) { // x > 0 is an expression with a boolean result
   System.out.println(x); // nested statement 1
   x--;                   // nested statement 2
}