String[] atp = {"Rafael Nadal", "Novak Djokovic",  
           "Stanislas Wawrinka",  
           "David Ferrer","Roger Federer",  
           "Andy Murray","Tomas Berdych",  
           "Juan Martin Del Potro"};  
List<String> players = Arrays.asList(atp);

// java1.7排序
Collections.sort(players, new Comparator<String>() {

    @Override
    public int compare(String o1, String o2) {
        return o1.compareTo(o2);
    }
});
System.out.println(players);

// java1.8排序 只针对有一个方法的匿名函数
Collections.sort(players,(s1, s2) -> s1.compareTo(s2));
System.out.println(players);

输出