0 votes
in JAVA by
What is the difference between an intermediate operation and a terminal operation in a stream pipeline?

a) Intermediate operations modify the stream, while terminal operations do not.

b) Intermediate operations are evaluated lazily, while terminal operations are evaluated eagerly.

c) Intermediate operations are executed sequentially, while terminal operations are executed in parallel.

d) Intermediate operations return a new stream, while terminal operations return a non-stream result.

1 Answer

0 votes
by

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.

...