In Java 8, the Stream.reduce() and Stream.collect() methods are used for performing reduction operations, but they are intended for different […] Continue reading »
In this blog, we’ll explore the Java 8 Stream peek() method, understanding its purpose and demonstrating how it can be […] Continue reading »
Using the Java 8 Stream API min method, you can find the first and all smallest strings from a List. […] Continue reading »
In Java, we have multiple ways to find duplicate elements in a List. We can loop through the List and […] Continue reading »
In Java 8, Stream API’s max method returns the maximum element of this stream according to the provided Comparator and […] Continue reading »
A Map can also be sorted with stream.sorted() method in Java 8. We can sort the Map based on its […] Continue reading »
In this quick tutorial, we’ll learn how to sort Set in Java 8. stream.sorted() is a predefined method of Stream […] Continue reading »
In Java 8, the elements of a list are sorted by calling stream.sorted() method of Stream interface. As we know, […] Continue reading »
Java 8 Stream interface provides mapToInt() method to convert a stream integers into a IntStream object and upon calling sum() method […] Continue reading »
This guide walks you through how to iterate Enum in Java/Java 8. .values() method of an enum class return an […] Continue reading »
On this page, you will learn how to find and replace words in a file using Java Stream. Java introduced […] Continue reading »