Q. What is the difference between a parallel stream and a sequential stream?
β
Correct 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.