JVM Architecture interview questions
Class Loading, Metaspace
28 questions with answers and explanations · 28 flashcards
Questions
- Why is lazy loading of classes beneficial in a Java application?Multiple choiceMedium
- Which tool can be used to analyze Metaspace memory usage in a running JVM?Multiple choiceEasy
- How would you explain the key difference between PermGen and Metaspace in an interview?Multiple choiceMedium
- Which JVM diagnostic tool provides thread dump information?Multiple choiceMedium
- In the context of JVM Garbage Collection, what role does Metaspace play?Multiple choiceHard
- Which garbage collection event can impact Metaspace by reclaiming class metadata?Multiple choiceMedium
- When a Java class is loaded by the JVM, where is its bytecode initially stored?Multiple choiceEasy
- Which diagnostic tool would you use to analyze thread activity during a JVM hang?Multiple choiceHard
- What is stored in the Metaspace of the JVM?Multiple choiceEasy
- During high traffic, like Black Friday, which JVM GC strategy can help manage memory effectively by minimizing long stop-the-world pauses?Multiple choiceHard
- Why does Metaspace over the old PermGen help in practice?Multiple choiceEasy
- What potential problem might arise from heavy use of dynamic proxies in a Java application?Multiple choiceMedium
- How does Metaspace handle class unloading?Multiple choiceEasy
- Why was PermGen replaced by Metaspace in Java 8?Multiple choiceMedium
- What impact does excessive use of reflection and dynamic proxies have on Metaspace?Multiple choiceMedium
- Which of the following scenarios can lead to a Metaspace OutOfMemoryError?Multiple choiceHard
- What happens when a static initialization block is present in a Java class?Multiple choiceMedium
- Why does Just-In-Time (JIT) compilation help in practice?Multiple choiceMedium
- How does JVM's Metaspace handle memory allocation differently from PermGen?Multiple choiceMedium
- When tuning Metaspace, which JVM option allows setting the initial size?Multiple choiceHard
- How does the JVM decide when to increase the Metaspace size?Multiple choiceMedium
- When analyzing a heap dump after a crash, where would you look for evidence of excessive Metaspace usage?Multiple choiceHard
- Which of the following statements about JVM bytecode verification is true?Multiple choiceMedium
- In which situation might increasing the Metaspace size not solve an OutOfMemoryError?Multiple choiceHard
- Which process describes loading a class only when it is first needed?Multiple choiceEasy
- During a stop-the-world pause in garbage collection, what happens to the application threads?Multiple choiceHard
- Which JVM diagnostic tool can be used to obtain a thread dump?Multiple choiceMedium
- Why does Metaspace in the JVM matter in practice?Multiple choiceEasy