forEach abstract method
Performs the given action for each element of the stream.
Example
IntStream.range(1, 5)
.forEach(print); // prints 1, 2, 3, 4
Implementation
void forEach(void Function(int) action);
Performs the given action for each element of the stream.
IntStream.range(1, 5)
.forEach(print); // prints 1, 2, 3, 4
void forEach(void Function(int) action);