Here you can find the source of reverseSort(final List
public static final void reverseSort(final List<String> lines)
//package com.java2s; import java.util.Collections; import java.util.Comparator; import java.util.List; public class Main { public static final Comparator<String> REVERSE_ORDER = new Comparator<String>() { @Override// w ww . ja va 2 s . c o m public int compare(final String o1, final String o2) { return o2.compareTo(o1); } }; public static final void reverseSort(final List<String> lines) { Collections.sort(lines, REVERSE_ORDER); } }