PRACTICE / UNDERSTAND / REPEAT

Java practice question

Practice streams with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

1 questionAnswers explainedFree · no login

Try this question

Streams · MCQQuestion link ↗

Which stream operation transforms each element?

Choose one answer
Answer & explanation

Answer: map

`map` transforms elements; `filter` keeps matching elements; `forEach` performs an action.