Posts related to tag: Java 8

Java 8 Collectors.groupingBy() Method Example

In this blog post, we will explore the Collectors.groupingBy() method, a valuable tool for grouping elements in a stream based […] 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 »

Method Reference in Java 8

In Java, method reference is a feature introduced in Java 8 that allows you to refer to a method by […] Continue reading »

Java StringJoiner Class: Simplify String Concatenation

Java 8 introduced a new utility class called StringJoiner, which provides a convenient and expressive way to join strings together […] 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 Consumer and Supplier Example

Java 8 introduced several functional interfaces in the java.util.function package to support functional programming paradigms. Among these interfaces, Consumer and […] Continue reading »

Java 8 Predicate vs Function: A Comparison with Examples

Java 8 introduced several new features to enhance the language’s functional programming capabilities. Among these features are Predicates and Functions, […] Continue reading »

Java- Return the Squares of a Sorted Array in Sorted Order

In this Java exercise, you have an integer array sorted in non-decreasing order, and you must return an array of […] Continue reading »

Java 8 Stream filter() Method Example

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

1 2 3 4 5