You can use this:
Arrays.sort(data, Collections.reverseOrder());
Collections.reverseOrder()
returns a Comparator
using the inverse natural order. You can get an inverted version of your own comparator using Collections.reverseOrder(myComparator)
.