Reference:
Http://www.cnblogs.com/nayitian/p/3269585.html
public static void Main (string[] args) {
TODO auto-generated Method Stub
list<integer> pokerlist = new arraylist<integer> ();
Pokerlist.add (13);
Pokerlist.add (14);
Pokerlist.add (3);
System.out.println ("Far Order:" + pokerlist);
1) sort (from small to large)
Collections.sort (pokerlist);
System.out.println ("Sort after order:" + pokerlist);
2) Invert/invert
Collections.reverse (pokerlist);
System.out.println ("Reverse after Order:" + pokerlist);
3) sort (from big to small)
Collections.sort (Pokerlist,collections.reverseorder ());
System.out.println ("Sort by large to small:" + pokerlist);
3) sort (from big to small)
Collections.sort (pokerlist); First, the island is big.
Collections.reverse (pokerlist); Re-invert
System.out.println ("Sort by large to small:" + pokerlist);
}
Java: Collection, Collections Tool class usage