World 21 of 26 · Advanced

⚙️ JVM Internals & Memory

16 Java concepts, each explained step by step with real code, a common trap and practice questions.

  1. JVM architectureClass loader subsystem, runtime data areas, execution engine.
  2. Class loadingBootstrap, platform and application loaders; parent delegation; loading, linking, initialization.
  3. When a class is initializedLazy initialization on first active use; static init order.
  4. Runtime memory areasHeap, stacks, metaspace, PC register, native method stack.
  5. Stack vs heapFrames and locals on the stack, objects on the heap; escape analysis.
  6. Reachability & GC rootsObjects alive if reachable from roots; cycles are still collected.
  7. Generational GCYoung (eden, survivors) and old generations; minor vs major collections.
  8. Garbage collectorsSerial, Parallel, G1 (default), ZGC, Shenandoah and their trade-offs.
  9. Reference typesStrong, soft, weak, phantom references; WeakHashMap; Cleaner.
  10. Memory leaks in JavaStatic collections, listeners, caches, ThreadLocals, inner classes.
  11. OutOfMemoryError typesJava heap space, Metaspace, GC overhead limit, unable to create native thread.
  12. JIT compilationInterpreter, C1/C2 tiered compilation, hot spots, inlining, deoptimization.
  13. Bytecode & javapStack-based instructions, invokevirtual/invokestatic/invokeinterface/invokedynamic.
  14. JVM flags & tuning basics-Xms, -Xmx, -Xss, choosing a GC, container awareness.
  15. Diagnostic toolsjcmd, jstack, jmap, JDK Flight Recorder, Mission Control, heap dumps.
  16. Object layout & headersObject headers, alignment, compact object headers in Java 25.