Return to site

JAVA CERTIFICATION QUESTION: Streams and flatMap operations in Java

· java,ocp

The powerful peek() function can be tricky to use correctly in Java streams.

Given the code fragment:

What is the output? Choose one.

A. ad

B. [a,d]

C. anaddx

D. adndax

E. [[a,d][n,d][a,x]]

F. Compilation fails due to the argument to peek.






·ꓷ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ


All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!