JVM Internals
1.t is the primary role of the Java Virtual Machine (JVM)?
-
A. To compile Java source code into bytecode.
-
B. To execute Java bytecode on various hardware platforms.
-
C. To provide a graphical user interface for Java applications.
-
D. To manage external libraries and dependencies.
To execute Java bytecode on various hardware platforms.
To execute Java bytecode on various hardware platforms.
2.Which component of the JVM is responsible for converting bytecode into machine code at runtime?
-
A. Classloader
-
B. JIT (Just-In-Time) Compiler
-
C. Garbage Collector
-
D. Interpreter
JIT (Just-In-Time) Compiler
JIT (Just-In-Time) Compiler
3.What is the permanent generation (PermGen) in the JVM primarily used for (prior to Java 8)?
-
A. Storing application object data.
-
B. Storing class metadata, interned strings, and static variables.
-
C. Storing method call stack frames.
-
D. Storing native method code.
Storing class metadata, interned strings, and static variables.
Storing class metadata, interned strings, and static variables.
4.Which area of the JVM stores local variables and operand stack for each thread?
-
A. Heap
-
B. Method Area
-
C. PC Register
-
D. Java Virtual Machine Stack
Java Virtual Machine Stack
Java Virtual Machine Stack
5.What is the purpose of the Classloader in the JVM?
-
A. To load .java files from disk.
-
B. To load .class files into memory.
-
C. To manage the heap space.
-
D. To optimize bytecode for faster execution.
To load .class files into memory.
To load .class files into memory.