In this tutorial, we will learn how to find out the min and max value from a stream of comparable elements such as characters, strings,… [Read More]
Java 8 Stream – allMatch() example
In the last tutorials we have seen the anyMatch() and noneMatch() methods. In this guide, we will discuss stream allMatch() method, which returns true if… [Read More]
Java 8 Stream – noneMatch() example
In the last tutorial we discussed java stream anyMatch() method. The stream noneMatch() method works just opposite to the anyMatch() method, it returns true if… [Read More]
Java 8 Stream – anyMatch() example
In this tutorial we will see the example of Java 8 Stream anyMatch() method. This method returns true if any elements of the Stream matches… [Read More]
Java 8 – Calculate days between two dates
We have already seen How to find the number of Days between two dates prior to Java 8. In this tutorial we will see how… [Read More]
Java 8 Lambda Comparator example for Sorting List of Custom Objects
We have already seen how to sort an Arraylist of custom Objects without using lambda expression. In this tutorial we will see how to sort… [Read More]
Java 8 features with examples
Java 8 got released on March 18, 2014. There are several new features that are introduced in this release. I have covered all the Java… [Read More]
Java 8 – Arrays Parallel Sort with example
Java 8 introduced a new method parallelSort() in the Arrays class of java.util package. This method is introduced to support the parallel sorting of array… [Read More]
Java 8 Optional Class
In Java 8, we have a newly introduced Optional class in java.util package. This class is introduced to avoid NullPointerException that we frequently encounters if… [Read More]
Java 8 StringJoiner with example
In java 8, a new class StringJoiner is introduced in the java.util package. Using this class we can join more than one strings with the… [Read More]
Java 8 – Stream Collectors Class with examples
Collectors is a final class that extends the Object class. In this tutorial we will see the examples of Java Stream collectors class using lambda… [Read More]
Java 8 forEach method with example
In Java 8, we have a newly introduced forEach method to iterate over collections and Streams in Java. In this guide, we will learn how… [Read More]
Java 8 – Filter a Map by keys and values
In the previous tutorial we learned about Java Stream Filter. In this guide, we will see how to use Stream filter() method to filter a… [Read More]
Java 8 – Filter null values from a Stream
In this tutorial, we will see how to filter the null values from a Stream in Java. Example: A stream with null values In this… [Read More]
Java 8 Stream Filter with examples
In the previous tutorial, we learned about Java Stream. I would recommend you to read that guide before going through this tutorial. In this guide,… [Read More]