摘要: 课程代码: 1 // 冒泡排序 2 public static int[] sort(int[] array){ 3 int temp = 0; 4 // 外层循环,判断走多少次 5 for (int i = 0; i < array.length-1; i++) { 6 // 内存循环,判断大小, 阅读全文
posted @ 2021-02-25 22:16 现在开始JAVA 阅读(467) 评论(0) 推荐(0)
摘要: 课程代码: 1 // 反转数组 2 public static int[] reverse(int[] arrays){ 3 int[] result = new int[arrays.length]; 4 5 // 反转操作 6 for (int i = 0,j=result.length-1; 阅读全文
posted @ 2021-02-25 21:19 现在开始JAVA 阅读(81) 评论(0) 推荐(0)