Internal working of HashMap in Java 8 & Beyond

How HashMap internally works in java is the most asked interview question. Even with just 1–2 years of experience, you’ve likely used HashMap in your code. However, many developers are unaware of how it actually works under the hood.

This article dives deep into the internal mechanics of HashMap, explaining how the get, put, operations work behind the scenes. I am going to discuss the internal working of HashMap in java with diagrams and code examples.

How HashMap works internally video tutorial

What Really Happens When You Instantiate a HashMap in Java

Blocking Queue Implementation in Java

In this blog, I am going to explain how to implement a thread-safe, blocking queue in Java using low-level concurrency primitives like wait(), notify() and notifyAll().

Java is multi-threaded language and in concurrent programming BlockingQueue plays a crucial role in managing producer-consumer problems. While Java provides robust implementations like ArrayBlockingQueue and LinkedBlockingQueue, understanding how to build a custom blocking queue from scratch helps you grasp core concurrency principles.