集合基操

集合基操

Jason Lv3

1.List

1
2
3
4
5
6
7
8
//排序
list.sort(Comparator);

//添加一个list
list.addAll(list2);

//转为stream 筛选
list.stream().filter(e -> e.getId() == 1).collect(Collectors.toList());
  • Title: 集合基操
  • Author: Jason
  • Created at : 2023-09-10 15:33:15
  • Updated at : 2023-09-10 16:01:46
  • Link: https://xxxijason1201.github.io/2023/09/10/JAVA/集合/
  • License: This work is licensed under CC BY-NC-SA 4.0.
 Comments
On this page
集合基操