Here are some basic interview questions on JVM in Java. Further, you can visit the introduction to the JVM topic to gain some basic knowledge.
1) Java Virtual Machine comprises ———.
A) Compiler
B) Interpreter
C) Both A & B
D) None of the Above
Click here for the Answer
Ans. C
2) JVM can run —– programs.
A) Only Java
B) Java and other computer languages that are converted into Java bytecode
C) All computer languages
D) None of the Above
Click here for the Answer
Ans. B
Questions on JVM in Java
3) In Java, the Java Virtual Machine architecture contains
A) Class Loader
B) Memory Area
C) Execution engine
D) All the Above
Click Here for the Answer
Ans. D
4) Importantly, inside the JVM
A) The source code converts into machine code
B) The source code converts into byte code
C) The byte code converts into machine code
D) All the Above
Click here for the Answer
Ans. B
5) Inside the JRE
A) The source code converts into machine code
B) The source code converts into byte code
C) The byte code converts into machine code
D) All the Above
Click here for the Answer
Ans. C
6) Which of the following statements is true?
A) JVM is part of JRE
B) JRE is part of JVM
C) JVM and JRE are interconnected but separate.
D) None of the Above
Click here for the Answer
Ans. A
7) Along with Java, JVM can also run and compile programming languages such as
A) Kotlin
B) Scala
C) Groovy
D) All the Above
Click here for the Answer
Ans. D
8) JVM offers other additional services, including
A) Security
B) Garbage Collection
C) Memory Management
D) All the Above
Click here for the Answer
Ans. D
9) In Java, —— files store the bytecode
A) .exe files
B) .class files
C) .text files
D) Any of the above
Click here for the Answer
Ans. B
10) Lastly, the JVM is a software that also provides hardware platform specifications.
A) True
B) False
Click here for the Answer
Ans. A