while语句版

class Demo {
public static void main(String[] args) {
for(int x=0; x<10; x++) {

//for语句版
System.out.println("HellWorld");
}
System.out.println("-------------");
//while语句版
int x=0;
while(x<10) {
System.out.println("HellWorld");
x++;
}
}

}

posted @ 2018-01-12 22:06  宋雪博客  阅读(90)  评论(0)    收藏  举报