Suppose you have a stream with one element and the code stream.xxxx.forEach(System.out::println). Filling in xxxx from top

Question:

Suppose you have a stream with one element and the code stream.xxxx.forEach(System.out::println). Filling in xxxx from top to bottom in the table, how many elements can be printed out? Assume a valid lambda expression is passed to each method in the table.

image text in transcribed

A. Zero or one, zero or more, exactly one

B. Zero or one, exactly one, zero or more

C. Zero or one, zero or more, zero or more

D. Exactly one, zero or more, exactly one

E. Exactly one, exactly one, zero or more

F. Exactly one, zero or more, zero or more  

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: