摘要: public class Sparse { public static void main(String[] args) { // 稀疏数组的目的是为了减少无意义的数组元素 /*0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 阅读全文
posted @ 2021-02-13 23:42 火鸡的呐喊 阅读(55) 评论(0) 推荐(0) 编辑
摘要: public class ArrayClass { public static void main(String[] args) { int[] arr = {1,2,3,4,5}; // 打印数组 System.out.println(Arrays.toString(arr)); // 填充数组( 阅读全文
posted @ 2021-02-13 21:44 火鸡的呐喊 阅读(29) 评论(0) 推荐(0) 编辑