java--while循环

while( 布尔表达式 ) {

//循环内容

}

只要布尔表达式的值为True,循环体语句就会执行

package hello.demo;

public class hello2 {
public static void main(String[] args){
int x = 20;
while (x < 100){
System.out.println("value of x : "+x);
x++;
//System.out.println(" ");
}
}
}
原文地址:https://www.cnblogs.com/shunguo/p/14455102.html