摘要: Break package com.tian.struct; public class BreakDemo { public static void main(String[] args) { int i = 0; while (i<100){ i++; System.out.println(i); 阅读全文
posted @ 2025-07-13 13:20 A那就算了吧 阅读(15) 评论(0) 推荐(0)
摘要: For循环 For和While的对比 package com.tian.struct; public class ForDemo01 { public static void main(String[] args) { int a = 1;//初始化条件 while(a<=100){//条件判断 S 阅读全文
posted @ 2025-07-13 13:19 A那就算了吧 阅读(28) 评论(0) 推荐(0)
摘要: While循环 package com.tian.struct; public class WhileDemo01 { public static void main(String[] args) { //输出1-100 int i = 0; while (i<100){ i++; System.o 阅读全文
posted @ 2025-07-13 13:18 A那就算了吧 阅读(8) 评论(0) 推荐(0)