摘要:
package struct; public class BreakContinueGoToD3 { public static void main(String[] args) { //goto不在Java之中,但有他的影子 //打印101-150之间的质数 //不建议使用!!! outer:fo 阅读全文
posted @ 2025-06-18 21:17
萧xiao
阅读(0)
评论(0)
推荐(0)
摘要:
package struct; public class BreakContinueGoToD2 { public static void main(String[] args) { int a=0; while(a<30){ a++; if(a%5==0){ continue;//continue 阅读全文
posted @ 2025-06-18 21:17
萧xiao
阅读(0)
评论(0)
推荐(0)
摘要:
package struct; public class BreakContinueGoTo { public static void main(String[] args) { int a=0; while(a<50){ a++; System.out.println(a); if(a==30){ 阅读全文
posted @ 2025-06-18 21:15
萧xiao
阅读(0)
评论(0)
推荐(0)
摘要:
主要便利数组 package struct; public class ForD5 { public static void main(String[] args) { int[] numbers={1,2,3,4,5};//定义了一个数组 for(int i:numbers){ //便利数组的元素 阅读全文
posted @ 2025-06-18 20:16
萧xiao
阅读(1)
评论(0)
推荐(0)
摘要:
package struct; public class ForD4 { public static void main(String[] args) { //打印九九乘法表: for (int i = 1; i <= 9; i++) {//1.首先打印第一列 for (int j = 1; j < 阅读全文
posted @ 2025-06-18 20:14
萧xiao
阅读(0)
评论(0)
推荐(0)