Package java.util
Class Collections

Public Method sort

static void sort(List l)

static void sort(List l, Comparator c)

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Sorts the specified list into ascending order. All elements in the list must be mutually comparable using the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the list). All elements in the list must implement the Comparable interface.

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

sort(List l) method:

Sorts the specified list into ascending order, according to the natural ordering of its elements.

sort(List l, Comparator c) method:

Sorts the specified list according to the order induced by the specified comparator.