1
JavaAdvanced#streams
reduce() with an identity always returns a value (the identity if the stream is empty). reduce() without an identity returns an Optional, since there's no default to fall back on for an empty stream.
int sum = Stream.of(1,2,3).reduce(0, Integer::sum); // 6, has identity Optional<Integer> max = Stream.of(1,2,3).reduce(Integer::max); // Optional[3]