List numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);
List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);
IntSummaryStatistics stats = integers.stream().mapToInt((x) -> x).summaryStatistics();
System.out.println("Average of all numbers : " + stats.getAverage());