Hi,
Could anyone tell me the difference between Stream.forEach() and Iterator.forEachRemaining() methods?
The explanation in
java docs says "Performs the given action for each remaining element until all elements have been processed or the action throws an exception.".
I got confused with this explanation. Does it mean that it will iterate and perform the action that we apply on remaining elements when iterator is in the middle?
Could someone please clarify?
Thanks, Raghu