0 votes
in JAVA by

What is the difference between a parallel stream and a sequential stream?

a) A parallel stream is more efficient than a sequential stream.

b) A parallel stream processes elements in parallel, while a sequential stream processes elements sequentially.

c) A parallel stream is always unordered, while a sequential stream is always ordered.

d) A parallel stream is always lazy, while a sequential stream is always eager.

1 Answer

0 votes
by

Answer: b) A parallel stream processes elements in parallel, while a sequential stream processes elements sequentially.

Explanation: Parallel streams can offer improved performance for certain types of processing, but they may also introduce additional overhead and synchronization issues.

...