Arrays.sort(names, 0, names.length, Collections.reverseOrder()); System.out.println("String array after sorting in descending order : " + Arrays.toString(names));