Geek Culture
Published in

Geek Culture

Photo by from

Java Streams: ForEach

Streams can be filtered, mapped, collected

There is also the possibility to loop over the stream elements to perform some logic. All in the one-line-of-code style, typical of functional programming.

Bear with me and let’s try to perform an operation over each element of our list of users. Let’s use the .forEach() method.




A new tech publication by Start it up (

Recommended from Medium

Crodo — IDO launchpad that connects people with Cronos galaxy.

Bootstrapping Zeppelin EMR

Tokenize Quranic Text (Surah Alfatihah) using NLTK

Life is a journey of twists and turns, peaks and valleys, mountains to climb and oceans to explore.

Code AutoGenerated with Python Script

How to build a network topology where you can ping to google but can’t to Facebook

AttributeError: module ‘torch’ has no attribute ‘__version__’

Are you aware of the upcoming trends in tech?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Daniele Quero, PhD

Daniele Quero, PhD

A professional developer with passion for game developing and skill-growing. A former Nuclear Physics Researcher who changed his life to pursue his dreams

More from Medium

Java Streams: anyMatch

Java Functional Programming — Part 3

Java Stream operations

Reactive Programming