Multiple Choice
Which statement creates an infinite stream of even numbers?
A) Stream<Integer> evens = Stream.iterate(2, n -> n + 2) ;
B) Stream<Integer> evens = Stream.range(n -> n + 2) ;
C) Stream<Integer> evens = Stream.generate(n -> n + 2) ;
D) Stream<Integer> evens = Stream.generator(2, n -> n + 2) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q75: Which method yields a new stream with
Q76: Complete the following code snippet that returns
Q77: Complete the following code snippet that checks
Q78: Which statement creates a set of majors
Q79: The method reference System.out::println is a shorthand
Q80: Which of the following is NOT a
Q81: Consider the following pseudocode that returns an
Q82: Which of the following can NOT be
Q83: Which of the following is NOT a
Q84: Which statement about streams and stream processing