上一页 1 2 3 4 5 6 7 8 ··· 80 下一页
摘要: java生成10以内的随机数 import java.util.Random; public class For02{ public static void main(String[] args){ System.out.println("随机生成10以内的1个整数"); Random random 阅读全文
posted @ 2025-04-28 17:44 胖豆芽 阅读(25) 评论(0) 推荐(0)
摘要: flag 为是否插入过了新数据 条件为真的判断语句是add<arr[i] 保证只插入一次的话 需要加上第二个条件 !flag 无论是否插入新数据 都需要将旧数据复制到新数组 假定 插入的值比所有数组内值都大,需要将值加在末尾 import java.util.Scanner; public clas 阅读全文
posted @ 2025-04-28 17:11 胖豆芽 阅读(7) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class For02{ public static void main(String[] args){ System.out.println("杨辉三角"); int arr[][] = new int[6][]; for(int 阅读全文
posted @ 2025-04-28 14:21 胖豆芽 阅读(9) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class For02{ public static void main(String[] args){ System.out.println("创建一个已知元素的二维数组 数组内元素个数不一样"); int arr[][] = {{ 阅读全文
posted @ 2025-04-28 13:36 胖豆芽 阅读(15) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class For02{ public static void main(String[] args){ System.out.println("创建一个已知元素的二维数组 数组内元素个数不一样"); int arr[][] = ne 阅读全文
posted @ 2025-04-28 13:25 胖豆芽 阅读(7) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2025-04-28 12:55 胖豆芽 阅读(6) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2025-04-28 12:44 胖豆芽 阅读(7) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class For02{ public static void main(String[] args){ System.out.println("打印二维数组"); int[][] arr = {//定义数组 {0,0,0,0}, { 阅读全文
posted @ 2025-04-28 12:35 胖豆芽 阅读(17) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class For02{ public static void main(String[] args){ System.out.println("找到数值并给出下标"); //定义一个数组 int [] arr= {24,69,80, 阅读全文
posted @ 2025-04-28 11:30 胖豆芽 阅读(7) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class For02{ public static void main(String[] args){ System.out.println("冒泡排序"); //定义一个数组 int [] arr= {24,69,80,57,13 阅读全文
posted @ 2025-04-28 11:18 胖豆芽 阅读(11) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 80 下一页