All the methods are static static
public static <T> void sort ( List <T> list) #### sort (list) corresponding to the set of sorted list
public static <T> int binarySearch ( List <?> list, T key) binary search
public static <T > T max (Collection <?> coll) max Min
public static void reverse (List <? > list) #### inversion
public static void shuffle (List <? > list) ### out of order, then replacement, equivalent to shuffle
import java.util.ArrayList; import java.util.Collections; public class demon1 { /* * A:Collections类概述 * 针对集合操作 的工具类 * B:Collections成员方法 * public static <T> void sort(List<T> list) public static <T> int binarySearch(List<?> list,T key) public static <T> T max(Collection<?> coll) public static void reverse(List<?> list) public static void shuffle(List<?> list) */ public static void main(String[] args) { ArrayList<String> a1 = new ArrayList<>(); a1.add("a"); a1.add("c"); a1.add("d"); a1.add("b"); System.out.println(a1); Collections.sort(a1); System.out.println(a1); System.out.println(Collections.binarySearch(a1, "b")); Collections.reverse(a1); System.out.println(a1); Collections.shuffle(a1); System.out.println(a1); } }