What is CyclicBarrier and When to Use It in Java?

In Java’s concurrency API, CyclicBarrier is another kind of synchronizer, similar to CountDownLatch. It enables multiple threads to wait for each other at a predefined execution point before resuming work. For example, consider a financial application that performs complex risk assessments for various portfolios. The reviews could involve multiple steps like data gathering, calculations and … Read more

What is CountDownLatch and How to Use It?

In Java’s concurrency API, CountDownLatch is a synchronizer that allows one or more threads to wait for a set of operations to complete. Imagine you’re developing a server application that relies on various resources to be initialized before it can start processing requests. These resources could be things like: Loading configuration files Establishing database connections … Read more

Exploring the Impact of Stack Size on JVM Thread Creation: A Myth Debunked

Does stack size have an impact on the number of native threads that can be created in a JVM environment?

Embracing Modernity: A Comprehensive Look at Sealed Classes, Pattern Matching, and Functional Paradigms in Java

Let’s examine the principles and practical applications of Sealed Classes and pattern matching.

Preparing for JDK 21: A Comprehensive Overview of Key Features and Enhancements

As we inch to the release of JDK 21 in September (next month!), get familiar with the features and improvements this version will bring!