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.

Related questions

0 votes
asked May 5 in JAVA by sharadyadav1986
0 votes
asked Apr 30 in JAVA by john ganales
...