Java 8 Map vs flatmap method
Map vs FlatMap: Java 8 stream API provides map() and flatMap() methods. Both these methods are intermediate methods and returns another stream as part of the output. map() method use…
Map vs FlatMap: Java 8 stream API provides map() and flatMap() methods. Both these methods are intermediate methods and returns another stream as part of the output. map() method use…
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 we do not perform null…
Oracle has released a new version of Java as Java 8 in March 18, 2014. It was a revolutionary release of the Java for software development platform. It includes numerous…
1. New classes and interfaces in java.util.concurrent Two new interfaces and 4 new classes have been added: Java9 Interface for concurrency Interface CompletableFuture.AsynchronousCompletionTask Interface CompletionStage Java9 Classes for concurrency Class…
Table of Contents: Exception Checked and Unchecked Exception in java Checked Exception UnChecked Exception Difference between checked and unchecked exception in java Try Catch and finally block Try with finally…
Table of Contents Basic points about the comparable interface. Program to sort on the basis of the name using Comparable. Program to sort on the basis of the id using…
Table of Contents Basic points about Comparator interface. Example of sorting using Comparator in java using anonymous class. Example of sorting using Comparator in java implementing Comparator interface. Example of…
We will cover following points of TreeMap in Java: Basic Points about TreeMap. Different ways to iterate TreeMap in Java. Constructors and methods of TreeMap in Java. Basics of TreeMap…
We will cover following points of LinkedHasMap in Java: Basic Points about LinkedHasMap. Different ways to iterate LinkedHasMap in Java. Constructors and methods of LinkedHasMap in Java. Basics of LinkedHasMap…
We will cover following points of HashMap in Java: Basic Points about HashMap. Different ways to iterate HashMap in Java. Constructors and methods of HashMap in Java. Basics of HashMap…