Track 03 · Java
The Java track
References vs objects, the string pool, collection internals and the garbage collector.
46 concepts mapped · 9 interactive now · 60 steps · free, no login
01Foundations
5 of 5 liveValues, references, and the split that explains everything.
- 01
References vs objects
The variable is never the object. It is a handle, and handles can be copied.
intro9 min7 steps0% - 02
Primitives & wrappers
Eight types that hold values, and their object counterparts.
intro7 min5 steps0% - 03
Autoboxing & the Integer cache
int is a value. Integer is an object. Java hides the conversion, and that is exactly the problem.
core9 min7 steps0% - 04
The string pool & ==
Two strings that print the same can still be two different objects.
intro8 min7 steps0% - 05
StringBuilder & concatenation
Why building a string in a loop with + allocates every iteration.
intro7 min6 steps0%
02Object orientation
1 of 5 liveClasses, inheritance and dispatch.
- 06
Classes & instances
Fields per object, methods shared, constructors chained.
intro8 min5 steps0% - 07
Inheritance & method dispatch
upcomingThe object's runtime class picks the method, not the variable's type.
- 08
Interfaces & default methods
upcomingMultiple inheritance of behaviour without multiple inheritance of state.
- 09
equals & hashCode
upcomingThe contract, and what breaks in collections when you violate it.
- 10
Records & immutability
upcomingValue-like classes, and why immutable objects are easier everywhere.
03Memory & the JVM
1 of 4 liveWhere objects live and how they are reclaimed.
- 11
Reachability & garbage collection
Nothing is freed because you stopped using it. It is freed because nothing can reach it.
core10 min7 steps0% - 12
Generational collection
upcomingMost objects die young, so the heap is split to exploit that.
- 13
Leaks in a managed language
upcomingA leak is a reference you forgot you were holding.
- 14
Class loading & static init
upcomingWhen a class is loaded, and when its static block actually runs.
04Collections
2 of 4 liveThe data structures you reach for daily.
- 15
ArrayList vs LinkedList
One is an array that occasionally moves. The other is a chain of boxes scattered across the heap.
core10 min8 steps0% - 16
Inside HashMap
An array of buckets, an index derived from the hash, and a chain when two keys land together.
core11 min8 steps0% - 17
TreeMap & ordering
upcomingA sorted map, Comparable vs Comparator, and O(log n).
- 18
Iterators & ConcurrentModificationException
upcomingWhy removing during a for-each throws, and what to do instead.
05Generics & errors
0 of 5 liveType safety at compile time, failure at runtime.
- 19
Generics
upcomingType parameters, and the compile-time checks they buy you.
- 20
Type erasure
upcomingGenerics vanish at runtime — which is why you cannot do new T[].
- 21
Wildcards & variance
upcomingProducer extends, consumer super — and why a List<Dog> is not a List<Animal>.
- 22
Checked vs unchecked exceptions
upcomingThe stack trace as a record of the frames unwound.
- 23
try-with-resources
upcomingDeterministic cleanup in a garbage-collected language.
06Streams & concurrency
0 of 6 liveDeclarative pipelines and more than one thread.
- 24
Streams & laziness
upcomingIntermediate operations build a pipeline; the terminal one runs it.
- 25
Collectors & grouping
upcomingTurning a stream back into a collection, map or summary.
- 26
Optional
upcomingMaking absence explicit in the type instead of returning null.
- 27
Threads & the memory model
upcomingTwo threads, one field, and why you need happens-before.
- 28
synchronized, locks & atomics
upcomingMutual exclusion, and the cheaper options when contention is low.
- 29
Executors & thread pools
upcomingSubmitting tasks instead of creating threads.
07JVM internals
0 of 5 liveWhat actually runs your bytecode.
- 30
Class loading & the loader hierarchy
upcoming12 minBootstrap, platform, application — three loaders in a delegation chain.
- Trace which loader loads String, javax.*, your own class
- Understand parent-first delegation and when it's broken
- Write a custom ClassLoader for plugin loading
- 31
The JIT & tiered compilation
upcoming13 minInterpreted at first, then C1, then C2 — and how HotSpot decides when.
- Explain interpreter → C1 → C2 tiering
- Read -XX:+PrintCompilation output
- Understand deoptimisation and why the JIT sometimes gives up
- 32
Escape analysis & stack allocation
upcoming11 minObjects that don't escape their method can live on the stack — no GC involved.
- Predict which objects a JIT will scalarise
- Write allocation-free hot loops
- Measure the win with -XX:+PrintEscapeAnalysis
- 33
Method inlining decisions
upcoming10 minThe single biggest source of speed the JIT gives you, and why it sometimes doesn't.
- Identify what stops the JIT from inlining a method
- Split hot methods to help inlining
- Read -XX:+PrintInlining output
- 34
Reflection & dynamic dispatch cost
upcoming9 minMethod.invoke is orders of magnitude slower than a direct call — for reasons.
- Benchmark direct call, reflected call, MethodHandle
- Use setAccessible to skip access checks
- Cache Method objects; never look them up in a hot path
08Concurrency deep
0 of 5 liveThe primitives inside java.util.concurrent.
- 35
The Java memory model
upcoming13 minhappens-before, volatile, and why unsynchronised reads can see stale data forever.
- Read a happens-before edge between two threads
- Use volatile for visibility without atomicity
- Recognise which JMM rules make double-checked locking work
- 36
Fork/Join & work stealing
upcoming12 minA pool where idle threads steal tasks from busy queues.
- Split a recursive task into RecursiveTask<V>
- Understand work stealing and why it beats round-robin
- Use commonPool sensibly (or avoid it)
- 37
ConcurrentHashMap & friends
upcoming12 minThread-safe collections that don't lock the whole thing.
- Use ConcurrentHashMap.compute atomically
- Choose between ConcurrentHashMap, CopyOnWriteArrayList, ConcurrentSkipListMap
- Understand why size() is only approximate under load
- 38
AtomicInteger, LongAdder & VarHandle
upcoming11 minWait-free counters — LongAdder is often 10× faster than AtomicLong under contention.
- Use CAS with AtomicReference for lock-free updates
- Choose LongAdder when writes dominate reads
- Access fields with VarHandle instead of sun.misc.Unsafe
- 39
Virtual threads (Project Loom)
upcoming12 minMillions of lightweight threads that block cheaply on I/O.
- Start virtual threads with Thread.ofVirtual
- Understand carrier threads and pinning
- Refactor a reactive pipeline back to blocking code without losing throughput
09GC deep
0 of 3 liveThe garbage collectors you actually pick between in production.
- 40
The G1 collector
upcoming12 minRegion-based collection with predictable pause targets.
- Understand young/old regions and the collection set
- Tune -XX:MaxGCPauseMillis and what it actually promises
- Read a G1 log to spot mixed-collection pain
- 41
ZGC & Shenandoah
upcoming12 minSub-millisecond pauses via concurrent compaction and load barriers.
- Explain coloured pointers and load barriers
- Compare CPU overhead versus pause time trade-off
- Choose ZGC for latency, G1 for throughput
- 42
GC tuning fundamentals
upcoming11 minHeap size, allocation rate, and reading GC logs like tea leaves.
- Size -Xmx from steady-state and peak live set
- Compute allocation rate from GC logs
- Diagnose promotion failures and humongous allocations
10Modern Java
0 of 4 liveLanguage changes that shape idiomatic modern Java.
- 43
Records & pattern matching
upcoming10 minData-only types that destructure directly in switch and instanceof.
- Deconstruct records in switch expressions
- Combine records with sealed hierarchies for exhaustiveness
- Understand why records get equals/hashCode for free
- 44
Sealed classes & exhaustive switch
upcoming10 minClose a hierarchy so the compiler can check every case.
- Seal a hierarchy with permits
- Get compile-time exhaustiveness on switch expressions
- Model algebraic-data-type-like sums in Java
- 45
Pattern matching in switch
upcoming11 minType patterns, guarded patterns, deconstruction — one construct for many jobs.
- Use type patterns to replace instanceof + cast chains
- Guard patterns with when clauses
- Deconstruct records inside case labels
- 46
The Foreign Function & Memory API
upcoming12 minCall native code without JNI, and share memory with it safely.
- Look up a symbol with SymbolLookup
- Bind a downcall handle to a C function
- Allocate and read a struct with MemoryLayout
The full syllabus is listed above in teaching order. Concepts marked upcoming are mapped but not yet built as visualizations. Progress is kept in this browser only.