Computer Science, asked by vinaygowd788kep5y9r3, 4 months ago


In Java, which of the following methods will you use to ensure the correct order of an iteration while calling the forEach()
function on a parallel stream?
forEach order()
forEachOrders()
forEachondered()
None of these​

Answers

Answered by TheDeadlyWasp
3

Explanation:

It will result in a runtime exception. 2) When you call forEach() on a parallel stream, the order of iteration is not guaranteed, but you can ensure that ordering by calling the forEachOrdered() method.

Hope it helps...

Similar questions