Java8

Functional Java: Powerful Feature of Java8 – Lambda Expression

Reading Time: 2 minutes As we know that java8 has come up with a lot of new features Lambda Expression is one of them. It will help us in many ways like reduce the boilerplate code and make our code look clean and concise. Lambda Expression A Lambda expression is an anonymous function and is expressed as an instance of functional interfaces. Why we need Lambda Expression and how Continue Reading

Different ways of Handling Exceptions in CompletableFutures

Reading Time: 3 minutes Hi Folks! As part of this blog, we will explore how we can handle exception in the different computing stages when we use CompletableFuture. We assume the read has the basic idea of the CompletableFuture. Nonethless, will start with the basic introduction of the CompletableFuture. What is CompletableFuture A CompletableFuture is used for asynchronous programming which was introduced as an improvement of the java Future API in Continue Reading

Merge Lists of Map to Map, Java 8 Style!

Reading Time: 3 minutes Today, while doing my work and having fun programming, I came across a problem that looked pretty easy in the beginning, but after starting doing it, had to take help of Google and read from different sites to get to a nice implementation. So, let’s look at the problem and how to solve it. The Problem Well, you guys probably already have guessed what the Continue Reading

Java concurrency: Reentrant Locks

Reading Time: 3 minutes Hello readers! Welcome to another blog in the Java concurrency series. Today, we are going to look at the Reentrant Locks in Java. What it is, how to use it, and mainly, what is the difference between using Reentrant Locks and synchronization. So, let’s dive straight into it. Reentrant Locks Reentrant locks work just like the synchronized locks in java, but have much more facilities Continue Reading

Java Concurrency: Count Down Latches

Reading Time: 2 minutes Hello readers, and welcome to yet another blog in the Java Concurrency series. Today, we are going to look at the CountDownLatch class in Java, what it is and how to use it. So, let’s dive straight into it.

How to deal with Inheritance while using Lombok builder

Reading Time: 2 minutes Today, I came across a problem and found a beautiful solution for it, which is pretty much straight forward, but the problem may occur to anyone while using the Lombok Library for java. So let’s look at the problem. The Problem I have a class Person, which consists of some fields. It is annotated with the @Builder annotation of lombok, so that lombok can generate Continue Reading

Java Concurrency: Thread Confinement

Reading Time: 3 minutes Hello readers! In this blog, we are going to explore about Thread Confinement, what it means and how do we achieve it. So, let’s dive straight into it.

StackWalker in Java9

Reading Time: 2 minutes StackWalker was introduced in JDK9 as Stack Walking API or JEP-259.  StackWalker gives the snapshot of the stack trace of the current thread at any given point of time and has methods to walk over it. Now, we can easily filter out the information required, sort them and perform almost all the stream operations provided by Java.

Java Concurrency: Atomic Variables

Reading Time: 3 minutes In today’s blog, we will be discussing and understanding the use of atomic variables with regards to concurrency in Java. But before understanding atomic variables, let’s understand what do we mean by atomic or atomicity.

Basics of Functional Interface And Lambda Expression in Java8

Reading Time: 3 minutes Java is based on OOPS concepts and abstraction is one of its feature. So by using interfaces in Java, we achieve abstraction. Like a class, an interface can have methods and variables, but the methods declared in an interface are by default abstract (method signature without body).

Installation and switching between multiple versions of Java

Reading Time: 2 minutes Having trouble in keeping multiple versions of Java in your single system? You have approached at the right place for seeking the solution. In this blog, we will learn how to keep multiple versions of java in your system and how to switch between them as per your convenience. Before moving forward, let’s have a basic understanding of what is SDKMAN?