public static void sort(Object array[])
public static void sort(Object array[], int fromIndex, int toIndex)
public static void sort(Object array[], Comparator c)
public static void sort(Object array[], int fromIndex, int toIndex, Comparator c)
import java.util.Arrays;
public class MainClass {
public static void main(String args[]) throws Exception {
String[] a = new String[] { "A", "C", "B" };
Arrays.sort(a);
for (int i = 0, n = a.length; i < n; i++) {
System.out.println(a[i]);
}
}
}
A
B
C