diff --git a/pro_02.java b/pro_02.java new file mode 100644 index 0000000..790b9ab --- /dev/null +++ b/pro_02.java @@ -0,0 +1,6 @@ +int i=0;//初始化 i为0 +while(i<10){//进入循环前先判断条件是否为true + System.out.println("hello world!"); + i++;//每一次循环结束前i自增1 +} +System.out.println("while循环结束了。i="+i); \ No newline at end of file