List<String> names =newArrayList<>();// sortCollections.sort(names)// reverseList<Integer> numbers =Arrays.asList(1,2,3);Collections.reverse(numbers);// max 和 minList<Integer> numbers =Arrays.asList(10,5,8);int max =Collections.max(numbers);int min =Collections.min(numbers);// replaceList<String> list =newArrayList<>(Arrays.asList("A","B","A","C"));Collections.replaceAll(list,"A","X");// frequency 返回指定元素在集合中出现的次数List<String> list =Arrays.asList("A","B","A","C","A");int count =Collections.frequency(list,"A");