Sort in reverse order
import java.util.Arrays; import java.util.Collections; public class Main { public static void main(String args[]) { String[] myArray = new String[] { "A", "a", "B" }; Arrays.sort (myArray, Collections.reverseOrder()); System.out.println(Arrays.toString(myArray)); } } //[a, B, A]