当测试表达式且结果为false时,将跳过循环体并执行while循环之后的第一条语句。
例子:
int x = 6; while( x < 10 ) { System.out.println(x); x++; } System.out.println("循环结束"); /* 6 7 8 9 循环结束 */
注意,最后一个print方法不在while范围内。
0