Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 231

java.util.stream.Stream?

Which statement is true about -

    Correct Answer: A

    A stream cannot be consumed more than once. In Java, once a stream has been operated upon or consumed, it cannot be replayed or reused. If there's a need to perform multiple operations on the same dataset, you would need to create a new stream. Modifying the source data or changing the execution mode during processing are not characteristics of streams, and there is no guarantee that a parallel stream is always faster than a sequential stream due to potential overhead in managing parallel tasks.

Discussion
M_JawadOption: A

A is the answer

WilsonKKerll

Answer is B. Option A use peak() method can do it.

iSnover

Sorry, the peak() method is an intermediate operation. The answer is A.

asdfjhfgjuaDCVOption: A

A is the answer

iSnoverOption: A

The answer is A, the answer cannot be B because peak() is an intermediate operation.

steefaandOption: A

A is correct.