Arrays.sort()的使用主要分为对基本数据类型数组的排序和对对象数组的排序.
int[] intArray = new int[]{5,2,7,1,3};
Arrays.sort(intArray);
System.out.println(Arrays.toString(intArray));
更多内容看:https://blog.csdn.net/junjunba2689/article/details/81813894
toString() 方法返回此对象本身(它已经是一个字符串)。这里重写了toString()方法,返回字符串的值。
更多内容看:https://blog.csdn.net/qq_34626097/article/details/83154781