Q. What is the difference between an intermediate operation and a terminal operation in a stream pipeline?
β
Correct Answer: (A)
Intermediate operations modify the stream, while terminal operations do not.
Explanation: Intermediate operations transform the stream into a new stream, while terminal operations produce a result or a side-effect.