Our website loads in split second powered by Schema Theme. Thanks to MyThemeShop

Tag: forEach

java8 – forEach vs forEachOrdered

With Java8 streams, we take the advantage of parallelism on multi core processor. Java8 has introduced forEach() forEachOrdered() on collections to iterate over a stream of elements, however there is a difference between the two methods. Quoting from Javadoc: The …