摘要:
1.Random使用步骤: package com.itheima.Random; import java.util.Random; public class Random1 { public static void main(String[] args) { Random random=new R 阅读全文
posted @ 2023-11-29 18:56
小彭先森
阅读(65)
评论(0)
推荐(0)
摘要:
1.总览: break:跳出并结束当前所在循环的执行 continue:用于跳出当前循环的当次执行,直接进入循环的下一次执行 package com.itheima.BreakAndContinue; public class BreakAndContine1 { public static voi 阅读全文
posted @ 2023-11-29 17:26
小彭先森
阅读(28)
评论(0)
推荐(0)
摘要:
1.死循环: 写法 package com.itheima.loop; public class EndLessLoop { public static void main(String[] args) { //掌握死循环写法 // for(;;){ // System.out.println("s 阅读全文
posted @ 2023-11-29 17:09
小彭先森
阅读(47)
评论(0)
推荐(0)
摘要:
1. 阅读全文
posted @ 2023-11-29 16:54
小彭先森
阅读(12)
评论(0)
推荐(0)
摘要:
1. package com.itheima.loop; public class Dowhile1 { public static void main(String[] args) { int i=0; do{ System.out.println("1"); i++; }while (i<3); 阅读全文
posted @ 2023-11-29 16:49
小彭先森
阅读(12)
评论(0)
推荐(0)
摘要:
1.whille循环格式: package com.itheima.loop; public class While1 { public static void main(String[] args) { int i=0;//初始化语句 while(i<5){//循环条件 System.out.pr 阅读全文
posted @ 2023-11-29 16:20
小彭先森
阅读(64)
评论(0)
推荐(0)
摘要:
1.for循环: 2. 3.for循环案例 package com.itheima.loop; public class For2 { public static void main(String[] args) { for (int i = 0; i <=100 ; i++) { System.o 阅读全文
posted @ 2023-11-29 16:00
小彭先森
阅读(59)
评论(0)
推荐(0)
浙公网安备 33010602011771号