Many times we have a list of particular object & we want to reduce it to some different type. Here…
Category: Java 8
This articles provide good examples of all functional interfaces with TWO method arguments from java.util.function package. It covers all methods…
Period & Duration classes represent difference between 2 instances of temporal objects i.e. objects that represent date, time, zone etc.…
New package java.time that was introduced in Java 8 has surely made representation of date & time more closer to…
For Java 8 streams, there are several inbuilt collectors available like java.util.stream.Collectors.toList(), java.util.stream.Collectors.summarizingInt() etc. This article will explain how to create your…
Java 8 has added lots of good to use methods to make it easy to use with streams, easy to…
What is it? Method in interface with default keyword. Method marked default will have an implementation within interface itself. Subclasses…
Multiple arguments: In case of a functional interface whose method has multiple arguments, below example shows how to implement it…
Streams reduce with identity: reduce() is a method provided as a part of streams api which comes handy when you…
Example of reduce function in Java 8 streams: reduce() is a method provided as a part of streams api which…