转载自:https://www.cnblogs.com/bekeyuan123/p/6891875.html 数组的定义: // 3种定义方式 int[] arr = new int[5]; int[] arr1 = {1,2,3,4,5}; int[] nums = new int[]{1, 2, 3}; long[] arr2 = new long[6]; String[] strs = new String[5]; // 数组可以存储引用类型 Person[] ps = new Perso…