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;
}
}
}
}