尝试:
Map<Integer, Long> counters = persons.stream() .collect(Collectors.groupingBy(p -> p.getBirthday().getMonthValue(), Collectors.counting()));
欢迎分享,转载请注明来源:内存溢出
尝试:
Map<Integer, Long> counters = persons.stream() .collect(Collectors.groupingBy(p -> p.getBirthday().getMonthValue(), Collectors.counting()));
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)