List<Integer> integers = Arrays.asList(1, 2, 3, 4, 5); Integer sum = integers.stream().collect(Collectors.summingInt(Integer::intValue));