The difference becomes clear when you work with parallel streams. findFirst() performs an ordered traversal, and will return the first element that matches the predicate. findAny() can be performed in parallel, and will return the first element found by any thread that matches the predicate.
posted 3 years ago
Ah I see...thank you very much Stephan!;)
That's a very big dog. I think I want to go home now and hug this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop