Simple Introduction to ForkJoin Framework - Part 2

In the first part of this series we went through the introduction on ForkJoin framework. In this article we will go through code example to create a ForkJoinTask using RecursiveAction....

Simple Introduction to ForkJoin Framework - Part 1

ForkJoin framework allows us to execute tasks in a thread based environment. We need to pass tasks to this framework and this framework will execute them efficiently. This framework provides...

Strategy design pattern

This article will explain the strategy design pattern using functional interfaces. Sometimes application may need to execute an algorithm conditionally. Here the algorithm means nothing but a strategy, execution of...

Introduction to java.time - Part 1

This article will provide introduction to the java.time package. This package is introduced in Java 8 version and it contains many classes and interfaces to represent and process dates and...

How ConcurrentModificationException is thrown?

How concurrent modification detection logic works and on what basis ConcurrentModificationException is thrown? This article will explain these questions. Iterating a collection is one of the important operation we usually...

Regex Tester With Spring Shell

Spring framework is the suite of many projects, using which we can develop wide variety of applications. These applications may need user interaction, the most common way is to have...

Infinite streams

Streams allows us to generate endless progression of discrete objects. There are couple of methods available in Java which will help us to generate infinite sequences.

Recipes for Optional

Optional allows us to wrap a nullable object in it so we can make a method to return Optional instead of bare object. There is a possibility that below method...

Functions cheat sheet

Functional interface will have single abstract method and they provide target types for lambda expressions. There are many functional interfaces in Java and they all are available in java.util.function package....