4 topics · 0/4 read
JVM Internals & Performance
JVM memory areas (heap, stack, metaspace), garbage collection and collectors like G1 and ZGC, class loaders, memory leaks and diagnosing production problems.
JVM Memory: Heap, Stack and Metaspace
The JVM splits memory into the heap for objects, a stack per thread for method frames, and metaspace for class metadata. Interviewers ask where variables live, what causes StackOverflowError and OutOfMemoryError, and how
Read nowGarbage Collection and Collectors (G1, ZGC)
Garbage collection frees memory of objects that are no longer reachable. Interviewers ask how the JVM decides what is garbage, how generational collection works, and how G1, ZGC and Parallel GC differ.
Read nowClass Loaders and Class Loading
Class loaders find and load classes into the JVM. Interviewers ask about the loader hierarchy, parent delegation, the loading, linking and initialisation phases, and the difference between ClassNotFoundException and NoCl
Read nowDiagnosing High CPU, Memory Leaks and Slow Java Services
Senior Java interviews ask what you would do when a service has high CPU, growing memory or slow responses in production. The answer is a calm process with JDK tools: thread dumps, heap dumps, GC logs, JFR and metrics.
Read now