Arrays.sort(Array)对数组排序
public static void main(String[] args) throws IOException {
int[] a = {1,3,9,23,54,4,5,2};
Arrays.sort(a);
for(int i : a){
System.out.println(i);
}
}
Arrays.sort(Array)对数组排序
public static void main(String[] args) throws IOException {
int[] a = {1,3,9,23,54,4,5,2};
Arrays.sort(a);
for(int i : a){
System.out.println(i);
}
}
转载于:https://www.cnblogs.com/chenweichu/p/6264531.html