unkletayo

Java Collections & Data Structures: From Scratch

Build the data structures behind Java's collections, from arrays and ArrayList toward B+ trees and lock-free queues, and see how the JVM memory model shapes them.

3 parts published

  1. 1 How the JVM Actually Lays Out Arrays in Memory Start here How HotSpot lays out primitive arrays compared with arrays of object references, across stack frames, object headers, and CPU caches. 2026-09-24
  2. 2 Why You Must Always Override equals() and hashCode() Together in Java Why equals() and hashCode() have to agree, and how breaking that contract causes silent HashMap lookup bugs and memory leaks. 2026-10-01
  3. 3 How Java ArrayList Works Internally: Resizing, Growth Factor, and Memory Build an ArrayList from scratch and see how resizing, System.arraycopy and garbage collection shape its performance. 2026-10-13