Assume that today is June 1, 2020. What is the result of the following?
Stream<LocalDate> s = Stream.of(LocalDate.now()); UnaryOperator<LocalDate> u = l -> l; s.filter(l -> l != null).map(u).peek(System.out::println);
C.
There is no terminal operation.
Since the intermediate operations use lazy evaluation, they wait for a terminal operation to run.
Since there is no terminal operation, peek()
never runs.