DEV Community

Discussion on: Let's talk about STREAMS !!

jackydev profile image

the article was good but forEach is not really part of streams. it is an implementation of the functional or iterable interface and can be used for any list even without a stream. would be less performing than List.forEach if used directly. If you use Filter and Map operations before forEach its a benefit to use it on Streams.

the_unconventional_coder profile image
ABHINAVA GHOSH (he/him) Author

Actually we use .forEach() so frequently with Streams that i thought of mentioning it, under Streams.

Some comments have been hidden by the post's author - find out more