javase-排序

 public class sort {
public static void main(String[] args) {
String[] arr = {"aa","bb","cc","dd"};
System.out.println(Arrays.toString(arr));
// sort(arr);
// System.out.println(Arrays.toString(arr));
Arrays.sort(arr);
for (String string : arr) {
System.out.print(string);
}
} private static void sort(String[] arr) { for (int i = 0; i < arr.length-1; i++) {
for (int j = i+1; j < arr.length; j++) {
String temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
}
}
上一篇:java-调用`invalidateViews()`后重新绘制项目时


下一篇:win 文字转化为语音