Java Stream min and max

In this post, we will learn about using Java Stream min and max methods to find the minimum and the maximum element in a Java Stream.

September 25, 2023

Java Stream Reduce

We use the Java Stream’s reduce method to reduce a stream of values to a single result. There are three overloaded Stream#reduce operation.

January 2, 2023

Java Stream toArray

The Java stream toArray methods, which we learn in this post, allow us to collect/convert a stream into an array.

March 15, 2022

Google Guava Streams

Google Guava offers many utility methods to simplify the coding. In this post, we will learn about the utilities in the Google Guava Streams.

September 27, 2021

Collectors mapping in Java

Collectors mapping in Java is a static method in the Collectors class. In this post, we will learn about the mapping method in Collectors.

August 23, 2021

Six Ways to Convert a Java Stream to a List

In this post, we will see six ways to convert a Java stream to a List. You can extend these if you want to convert a stream to a Set as well.

December 14, 2020

Java 8 LongStream – A Complete Guide

The Java 8 LongStream is a sequence of primitive long-valued elements and is a long primitive specialization of Stream.

December 8, 2020

Collectors Joining in Java 8

Collectors.joining returns a Collector which concatenates the stream elements separated by a delimiter, prefix and suffix in encounter order.

November 30, 2020

4 Ways to throw Checked Exceptions in Java Streams

This post shows 4 ways to throw checked exceptions in Java streams i.e., having a lambda expression that can throw checked exception(s).

November 17, 2020

Java Stream Distinct by Property

Java Streams has a distinct method which removes duplicates by object’s equal method. This post explains ways to apply distinct by a property.

November 9, 2020