Page 1 of 1
About Question enthuware.ocpjp.v8.2.1897 :
Posted: Tue May 16, 2017 11:26 pm
by lenalena
Question about option 2: Is it possible for items in the stream to lose their original order if the stream is switched to parallel and then back to sequential again?
Re: About Question enthuware.ocpjp.v8.2.1897 :
Posted: Tue May 16, 2017 11:56 pm
by admin
Official documentation doesn't mention anything about that. Logically, once you make the stream parallel, I don't think there is any guarantee about the original order anymore even if you later make it sequential.
Also, since there is no official description of the behavior in this situation, one should not assume that the original will be preserved.
HTH,
Paul.
Re: About Question enthuware.ocpjp.v8.2.1897 :
Posted: Wed May 17, 2017 9:32 am
by lenalena
I asked this because I found the correct option (option 2) to be ambiguous. The question asks
Which of the following options can be used to replace line at //2 without affecting the output?
The original stream is sequential. The correct option converts it to parallel then back to sequential again, with the possibility of values being ordered differently than in the original stream. So, while the values themselves will be the same as in the original stream, their order might be different, and this, to my understanding, "affects the output".
Re: About Question enthuware.ocpjp.v8.2.1897 :
Posted: Wed May 17, 2017 10:32 pm
by admin
You are right.
thank you for your feedback!
Paul.