In trying to learn Java lambdas, I came across an article (listed below), where under a section on the limitations of the stream API, he states that: "Stateful lambdas are usually not a problem when executing sequentially, but when the stream execution is parallelized, it breaks". He then gives this code as an example of problems due to execution order:In trying to learn Java lambdas, I came across