Java Streams

Java Streams are a powerful feature introduced in Java 8 for processing sequences of data in a functional and declarative style. They provide a high-level abstraction over collections, arrays, and other data sources, enabling concise and expressive operations on data.

Java Streams are part of the java.util.stream package and are designed to work seamlessly with lambda expressions, which were also introduced in Java 8.

Related Tags

Tutorials

Filter Nested Collections with Stream in Java

Java Stream API provides excellent filtering capability on the elements in the Stream. Sometimes, the stream elements also contain the nested collections; we need to filter those elements in the nested collections. This Java tutorial discusses various approaches with examples to apply filtering on nested collections and collecting the filtered …

Java Stream mapMulti() Example

Stream mapMulti() is a specialized form of the map() method that transforms each element of a stream into one or multiple output elements or none at all.

Java 8 Stream – Collectors GroupingBy with Examples

Learn to use Collectors.groupingBy() method to group and aggregate the Stream elements similar to ‘GROUP BY‘ clause in the SQL. Stream -> groupingBy() -> Map of elements after applying ‘group by’ operation 1. Collectors.groupingBy() Method 1.1. Syntax The groupingBy() method returns a Collector implementing a “GROUP BY” operation on Stream …

How To Debug Java Streams

Debugging Java streams can be challenging. In this post, learn to debug streams as their elements are processed in the chained method calls.

Java Stream Tutorials

This Java tutorial lists down the published tutorials on this blog related to Stream API, methods and its related concepts with examples.

Primitive Type Streams in Java

Learn to create and operate on the streams of primitive types (IntStream, LongStream and DoubleStream) in Java with examples.

Creating Streams in Java

Learn to create Streams of primitives and objects in Java using some most popular ways. We will learn to create finite as well as infinite streams.

Functional Interfaces in Java

Introduced in Java 8, a functional interface is simply an interface that has exactly one abstract method. Learn more about functional interfaces in this tutorial.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.