How Java works
Pick a topic, write code and watch what happens inside, step by step.
Memory
JVM: Stack and Heap
Primitives, objects, the String Pool, frames and GC. Follow line by line where your code lands in memory.
Garbage Collection
When is an object removed? GC roots, mark-sweep, Eden, Survivor, Old and memory leaks.
String inside
What is inside a String: byte[], LATIN1 and UTF16, emoji length, shared arrays and the cost of +=.
Objects in memory
How many bytes an object takes: header, mark word, padding, field order, arrays and the 32 GB line.
Collections
Concurrency
Threads
Drive two threads yourself. Race conditions, synchronized, volatile, CAS and deadlock.
How ConcurrentHashMap works
A HashMap for several threads. CAS on an empty bucket, a lock on a full one, resize and no nulls.
Virtual threads
How a million threads become possible: carriers, mount and unmount, pinning and where virtual threads do not help.
Language and JVM
Bytecode
What does javac write? The operand stack, local variables, the i = i++ trap and what finally really is.
Class loading
When is a class loaded? Delegation, three stages, static and constructor order, classic traps.
How Stream works
Streams are lazy. Elements pass one by one, sorted holds them all, and count sometimes runs nothing.