Mega Code Archive

 
Categories / Java Book / 005 Collection
 

0343 Sort a list

static<T extends Comparable<? super T>>void sort(List<T> list) Sorts the specified list into ascending order, according to the natural ordering of its elements. static<T> void sort(List<T> list, Comparator<? super T> c) Sorts the specified list according to the order induced by the specified comparator.