JVM & runtime interview questions
Memory areas, class loading, JIT, garbage collection.
4 questions with answers and explanations · 3 flashcards
Key ideas
- Objects live on the heap; each thread has a stack of frames holding locals and references.
- Class lifecycle: loading → linking (verify, prepare, resolve) → initialization (static initializers run once).
- Construction order: superclass first. Static blocks run at class initialization; instance initializers run before the constructor body.
- The JIT compiles hot bytecode to native code at runtime.