package com.tutego.insel.util;

import java.util.*;

public class CollectionsReverseSortDemo
{
  public static void main( String[] args )
  {
    List<String> list = new ArrayList<String>(); 
    Collections.addAll( list, "Adam", "Eva", "Set", "Enosch", "Kenan", "Mahalalel", "Jered" );
    
    Comparator<String> comparator = Collections.<String>reverseOrder();
    
    Collections.sort( list, comparator );
    
    System.out.println( list ); // [Set, Mahalalel, Kenan, Jered, Eva, Enosch, Adam]
  }
}
