In Java 8 and later versions, the Collectors class in the java.util.stream package provides various utility methods to...
Java 8 Articles
How to use the Optional class in Java 8 to handle null values?
In Java 8 and later versions, the Optional class is part of the java.util package and provides a way to handle null...
How to use the reduce() method in Java 8 to perform a calculation on a list of numbers?
In Java 8 and later versions, the reduce() method is available in the Stream API to perform a calculation on a list of...
Java 8 – How to find the max and min of two numbers without using if-else statements?
In this tutorial, we will see "How to find the maximum and minimum of two numbers without using if-else but in...
Java 8 – How to count occurrences of a number in an array using Streams?
In this tutorial, we will see "How to count occurrences of a specific number in an array using Java 8 Streams?" Count...
How to find Duplicate Elements in an Array in Java 8
In this tutorial, we will see "How to find Duplicate Elements in an Array using Java 8?". [bctt tweet="Find Duplicate...
Java 8 – How to convert Hexadecimal Number to Binary?
In this tutorial, we will see "How to convert Hexadecimal to Binary using Java 8?" How to convert hexadecimal number...
Java 8 – Find Sum of Two Matrices? (Simplest Example)
In this tutorial, we will see "How to find the sum/add of two matrices using Java 8 Streams?" Find sum of two...
Java 8 – Print Fibonacci Series for a given number using Streams? (Simplest Example)
In this tutorial, we will see "How to find or print the Fibonacci Series using Java 8 Streams API?" Find or Print...
Java 8 – How to convert Decimal number to Binary?
In this tutorial, we will see "How to convert Decimal number to Binary using Java 8?" How to convert decimal number...
Java 8 – How to SORT an Array in Ascending and Descending order using Streams?
In this tutorial, we will see "How to sort an array in Ascending and Descending order using Java 8?" How to sort an...
Java 8 – How to find the ‘Smallest’ and ‘Largest’ numbers in an array using Streams?
In this tutorial, we will see "How to find Smallest and Largest Numbers in an Array using Java 8?" Find Smallest and...