ArrayList<String> list=new ArrayList<>();
1.往集合中添加多个元素
Collections.addAll(list,"a","b","c");
2.打乱集合中的元素顺序
Collections.shuffle(list);
3.对集合进行排序,升序
Collections.sort(list1);
ArrayList<String> list=new ArrayList<>();
1.往集合中添加多个元素
Collections.addAll(list,"a","b","c");
2.打乱集合中的元素顺序
Collections.shuffle(list);
3.对集合进行排序,升序
Collections.sort(list1);