Java 8 stream 流获取 list 中最大值、最小值、总和值、平均值
static List<User> list = new ArrayList<User>();
static void init() {
list.add(new User("1号", 1));
list.add(new User("2号", 5));
list.add(new User("3号", 7));
}
public static void main(String[] args)..
原创
2021-10-21 17:33:45 ·
2882 阅读 ·
0 评论