Java Stream map operation

We use the Java Stream map (an intermediate operation) to map an element in a stream to a different value (of the same or different type).

October 30, 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

PrimitiveIterator in Java

A PrimitiveIterator in Java is an interface for the primitive specializations of an Iterator. In this post, we will learn about the PrimitiveIterator, its subclasses and its uses.

December 22, 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

Functional Interfaces in Java – Functions

In this post, we will learn about the functional interface in Java for functions present as part of the java.util.function namespace.

June 6, 2021

Java DoubleStream – A Complete Guide

A Java DoubleStream is a sequence of double-valued elements that supports sequential and parallel aggregate operations.

April 5, 2021

Default Methods in Java Map

Many JDK interfaces were enhanced with default methods in Java 8. In this post we will learn about the default methods in the Java Map interface.

March 22, 2021

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

Java 8 StringJoiner With Examples

Java 8 StringJoiner class can be used to build a sequence of characters that are separated by a configured delimiter, prefix and a suffix.

November 23, 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