reduce operation to calculate the same value: Integer totalAgeReduce = roster .stream() .map(Person::getAge) .reduce( 0, (a, b) -> a + b);.
確定! 回上一頁