DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Thread-Safety Pitfalls in XML Processing
  • Java Stream API: 3 Things Every Developer Should Know About
  • Understanding Lazy Evaluation in Java Streams
  • Exploring TakeWhile and DropWhile Functions in Java

Trending

  • Build Your First AI Model in Python: A Beginner's Guide (1 of 3)
  • A Deep Dive Into Firmware Over the Air for IoT Devices
  • MySQL to PostgreSQL Database Migration: A Practical Case Study
  • Understanding and Mitigating IP Spoofing Attacks
  1. DZone
  2. Coding
  3. Java
  4. Your Guide to Java Streams [Tutorials and Articles]

Your Guide to Java Streams [Tutorials and Articles]

By 
Peter Connelly user avatar
Peter Connelly
·
Dec. 09, 19 · Presentation
Likes (24)
Comment
Save
Tweet
Share
44.8K Views

Join the DZone community and get the full member experience.

Join For Free

stream-in-forest

In this edition of "Best of DZone," we've compiled our best tutorials and articles on one of the most popular APIs in Java, Streams. Whether you're a beginner just looking to bring in some elements of functional programming into a Java application, or a Streams vet, we've got your back!

Before we begin, we'd like need to thank those who were a part of this article. DZone has and continues to be a community powered by contributors like you who are eager and passionate to share what they know with the rest of the world. 

Let's get started!

Overview

  • A Guide to Streams: In-Depth Tutorial With Examples by Eugen Paraschiv — Java 8 and streams: A match made in heaven, but it can be a little overwhelming. In this post, we take an in-depth look at this combination with some examples.

  • Dipping Into Java 8 Streams by Dan Newton — With a working knowledge of lambda expressions and method references, you can see how streams enable you to work with Collections while efficiently adding logic.

  • Java Streams Overview, Part 1 and Part 2 by Zoltan Raffai — Get started working with Streams and learn everything you need to get started with basic classes, reading and writing operations, and working with errors. 

  • A Java 8 Streams Cookbook by Martin Farrell — If you're looking for a quick breakdown of Streams, look no further. This cookbook covers Streams' chief advantages, its operations, and a comprehensive example.

Processing Collections

  • Process Collections Easily With Stream in Java 8 by Leona Zhang — Learn how you can process collections easily with Stream in Java 8.

  • How to Compare List Objects in Java 7 vs. Java 8 by Arpan Das — In this blast from the not-too-distant past, we compare how Java 8's Stream API changed how you can compare List objects.

  • Mastering Java 8 Streams Part 1 and Part 2 by Marco Behler — Want to get your feet wet with Java streams? This introductory video will get you creating streams and performing simple tasks on them.

  • Convert a List to a Comma-Separated String in Java 8 by Mario Pio Gioiosa — This quick tutorial shows you how to use streams in Java to convert the contents of a list to a comma-separated string in Java 8.

Working With Files

  • Split a File as a Stream by Peter Verhas — Curious about when you would actually use the splitAsStream method? Here's a use case of splitting a file into chunks that can be processed as streams.

  • Java 8 Stream and Lambda Expressions – Parsing File Example by Eyal Golan — See a common use case for Streams and Lambda Expressions in this article.

Parallel  Streams

  • Think Twice Before Using Java 8 Parallel Streams by Lukas Krecan — Parallelization was the main driving force behind lambdas, stream API, and others. Let's take a look at an example of stream API.

  • Should I Parallelize Java 8 Streams? by Santhosh Krishnan — What do we need to consider before parallelizing Java streams?

Streams and Collectors 

  • Using Java Streams and Collectors by Jay Sridhar — This short guide covers how to use Java 8 Streams and Collectors to slice and dice lists, including computing sums, averages, and partitioning.

  • How to Use Java Stream Collectors by Yogen Rai — Want to learn more about using Java Stream collectors? Check out this post on collectors and how to use them.

  • How to Transform Elements In a Stream Using a Collector by Hubert Klein Ikkink — Learn more about how to transform elements in a Stream using Java Collectors.

  • The Ultimate Guide to the Java Stream API groupingBy() Collector by Grzegorz Piwowarek — Still a bit puzzled by what the groupingBy() collector can do in the Java Stream API? Check out this guide on using the groupingBy() collector to its fullest potential.

Stream Bugs

  • Java Stream API Was Broken Before JDK 10 by Grzegorz Piwowarek — Stream API bugs can affect anyone still residing on JDK 8 and JDK 9. Click here to learn more.

Lambda Streams

  • Java Lambda Streams and Groovy Closures Comparisons by Alex Staveley — Want to learn more about the difference between in lambda streams in both Java and Groovy? Check out this post to learn more about the differences between them.

Advanced Topics 

  • Are Java 8 Streams Truly Lazy? Not Completely! by Lukas Eder — Is it always the case that streams in Java 8 are evaluated lazily? Check out this article and find a possibly surprising result.

  • Overview of Java Stream API Extensions by Piotr Mińkowski — Check out the top Java Stream API extensions offered by popular Java libraries.

  • Java Stream: Is a Count Always a Count? Part 1 and Part 2 by Per-Åke Minborg — Learn more about counts in Java streams.

  • How to Reuse Java Streams by Miguel Gamboa — Need to use your streams over and over again? Let's cover three different approaches, their benefits, and their pitfalls when recycling Java streams.

  • Become a Master of Java Streams, Part 1: Creating Streams, Part 2: Intermediate Operations, Part 3: Terminal Operations, and Part 4: Database Streams, Part 5: Turn Joined Database Tables Into a Stream, and Part 6: Creating a New Database Application Using Streams by Per-Åke Minborg and Julia Gustafsson — Want to become a Java Streams Master?

  • Exception Handling in Java Streams by Brian Vermeer — When you want to use a method that throws a checkedException, you have to do something extra if you want to call it in a lambda.

  • Peeking Inside Java Streams With Stream.peek by Dustin Marx — How to use the Stream.peek(Consumer) method in Java to help visualize stream operations.

Be a Part of the Conversation!

Think we missed something? Want to contribute? Let us know in the comments below... or, join the conversation by becoming a member of our community of thousands of developers eager to share their knowledge and passion for programming with others.


Further Reading

  • The Best of Java Collections [Tutorials].
  • The Complete Apache Spark Collection [Tutorials and Articles].
Stream (computing) Java (programming language)

Opinions expressed by DZone contributors are their own.

Related

  • Thread-Safety Pitfalls in XML Processing
  • Java Stream API: 3 Things Every Developer Should Know About
  • Understanding Lazy Evaluation in Java Streams
  • Exploring TakeWhile and DropWhile Functions in Java

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!