Question: Given an instance of Stream s and Collection c, which of the following are valid ways of creating a parallel stream? (Choose three.) A. c.parallel()
Given an instance of Stream s and Collection c, which of the following are valid ways of creating a parallel stream? (Choose three.)
A. c.parallel()
B. c.parallel().parallelStream()
C. c.parallelStream()
D. s.parallelStream()
E. c.parallelStream().parallel()
F. s.parallel()
Step by Step Solution
3.31 Rating (154 Votes )
There are 3 Steps involved in it
The correct options to create a parallel stream in Java are C cparallelStream This is ... View full answer
Get step-by-step solutions from verified subject matter experts
