标签:min() tis statistic nts code system 最小 int color
1 /** 2 * Statistics测试. 3 * 4 * @param streamBeanList 5 */ 6 public void testStatistics(List<StreamBean> streamBeanList) { 7 8 IntSummaryStatistics intSummaryStatistics = streamBeanList.stream().mapToInt(x -> x.getAge()).summaryStatistics(); 9 10 System.out.println("年龄最大的是:" + intSummaryStatistics.getMax()); 11 System.out.println("年龄最小的是:" + intSummaryStatistics.getMin()); 12 System.out.println("年龄总和是:" + intSummaryStatistics.getSum()); 13 System.out.println("平均年龄是:" + intSummaryStatistics.getAverage()); 14 System.out.println("人数总和是:" + intSummaryStatistics.getCount()); 15 16 17 }
标签:min() tis statistic nts code system 最小 int color
原文地址:https://www.cnblogs.com/ff2ting/p/14832364.html