Geek Culture
Published in

Geek Culture

Photo by Sprocket2cog from Wikimedia Commons

Java Streams: Limit and Skip

If you go

user.stream().count();

you’re going to retrieve the long -valued number of items in the stream/list.

Working with the stream size may be useful and there are two intermediate operations, in particular, that I found easy to use and handy.

Limit

--

--

A new tech publication by Start it up (https://medium.com/swlh).

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

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