What is a semaphore, and when to use it?

In Java’s concurrency API, a semaphore is another synchronization tool that simultaneously controls the number of threads accessing a particular resource or section of code. It manages a set of permits; threads must acquire a permit before proceeding. If a permit is available, the thread acquires it and continues execution. If not, the thread is … Read more

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

Web Crawling in Java: A Tale of Classical Threads and Virtual Threads

A compelling narrative around web crawling in Java, contrasting classical threads with their newer counterpart: virtual threads.

Sealed Interfaces and Pattern Matching: A Quick Dive into Java’s Modern Capabilities

Sealed classes and interfaces, together with pattern matching, provide powerful new tools for more explicit, controlled, and flexible design in Java

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!

Busting Myths, Building Futures: A Conversation with Cay Horstmann on Java and Machine Learning

Cay Horstmann shares his experiences with Java, his writing process for technical books, the challenges of teaching Java, and discusses its role in education.

Dive into the OpenJDK: Top 10 Reads on Foojay.io

Foojay.io is a community platform dedicated to the needs of developers who use the OpenJDK and related technologies.

Charting the Course of Java: An Insightful Conversation with Java Champion, Sebastian Daschner

Explore the world of Java with Champion Sebastian Daschner, discussing his journey, future trends in Java, and tips for developer growth.

Exploring the Depths of Java: A Comprehensive Conversation with Jakob Jenkov, Part-II

Welcome back to the second installment of our in-depth conversation with Jakob Jenkov, a leading figure in the world of Java. If you joined us for Part I, you’ll recall the insightful discussions around the evolving landscape of Java and its continuous improvements. Today, we delve even deeper into the subject. Jakob will share his … Read more