In java 8 documentation (doc order stream), one can see this :
if [a stream] is not ordered, repeated execution might produce different results.
my question is quite simple : is there an easy way to illustrate this fact in a little unit test (maybe with an HashMap or some thing like this) ?
[Edit] the whole quote is here :
For sequential streams, the presence or absence of an encounter order does not affect performance, only determinism. If a stream is ordered, repeated execution of identical stream pipelines on an identical source will produce an identical result; if it is not ordered, repeated execution might produce different results.
Thus, my question is about a strictly sequential not parallele execution. It is this case that I'm questioning about.