疑问
liyiming-china opened this issue · comments
liyiming-china commented
Map<Department, Integer> totalByDept = employees.stream()
.collect(Collectors.groupingBy(Employee::getDepartment,
Collectors.counting()));// 下游收集器
Collectors.counting()怎么返回Integer
xiajiafu commented
Collectors.counting() 改为 Collectors.summingInt(e -> 1))