From c876577d065dac1f7b29cb543a27519d2b9e9cd4 Mon Sep 17 00:00:00 2001 From: pyh2if57b <15802626334@163.com> Date: Tue, 14 Nov 2023 14:53:43 +0800 Subject: [PATCH] Add pro_02.java --- pro_02.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 pro_02.java 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