Posts related to tag: Stream API


Java 8 Collectors.partitioningBy() Method Example

Java 8 Stream API’s Collectors.partitioningBy() method, which offers a powerful way to partition elements of a stream into two groups […] Continue reading »

Java 8– Find first and all longest strings in List

In Java 8, you can find the first and all longest strings from a list using the Stream API along […] Continue reading »

forEach() vs. forEachOrdered() in Java Stream

When working with Java Streams, you often encounter situations where you need to apply a function to each element of […] Continue reading »

Java 8 Stream generate() Method

In this article, we will explore the generate() method provided by Java 8 Stream API. The generate() method is a […] Continue reading »

Find nth Largest elements from Integer List using Java Stream

To find the nth highest elements from an integer list using Java 8 Stream API, you can follow these steps: […] Continue reading »

Java 8 – Find Non Duplicate Elements from List

In Java 8, you can use the Stream API and lambda expression features to find the non-duplicates element from a […] Continue reading »

Java 8- Find the nth Highest Salary

In this short article, you will learn how to find the nth highest salary of an employee using Java Streams […] Continue reading »

Java Stream map() vs flatMap() Method

Java Stream is a powerful feature introduced in Java 8 that allows developers to process collections of data in a […] Continue reading »

Java 8 Stream filter() Method Example

filter() method introduced in the Stream interface of Java 8 version under the package java.util.stream. filter() method is an Intermediate […] Continue reading »

Java 8 Stream API allMatch(), anyMatch() and noneMatch() method Example

On this page, we will learn about Java 8 Stream API allMatch(), anyMatch() and noneMatch() method with an example. allMatch(), […] Continue reading »

Capitalize the first letter of each word in a String using Java

On this page, we will learn how to capitalize the first letter of each word in a String using Java. […] Continue reading »

1 2