Streams & functional · interview question
Which of these is a terminal stream operation?
Multiple choiceEasy
Answer and explanation
Correct answer
A. collect
Why
Terminal operations (collect, forEach, reduce, count, findFirst...) trigger execution and consume the stream. A stream can't be reused after a terminal operation.
References
Test yourself on Streams & functional
A free test with instant, explained results. No account needed.