int arr = {1,5,4,2,3,7};
Arrays.sort(arr);
System.out.println(arr);
// 输出arr :{1,2,3,4,5,7}
int[] arr = {1,4,2,3,45,56};
List<int[]> list = Arrays.asList(arr);
int[] arr = {1,4,2,3,45,56};
//数组复制
int[] copyArr = Arrays.copyOf(arr, arr.length);
int[] arr = {1,4,2,3,45,56};
// 新数组长度
int len = 3;
// 数组: {1,4,2}
int[] newArr = Arrays.copyOf(arr, len);
int[] arr = {1,4,2,3,45,56};
// 起始位置(包含)
int start = 3;
// 截至位置(不包含)
int end = 5;
// 结果:{2,3}
int[] newArr = Arrays.copyOfRange(arr,start,end);
核心: Arrays 工具类的使用