Java MCQ – JDK JRE JVM and JIT
This collection of Java Multiple Choice Questions and Answers (MCQs): Quizzes & Practice Tests with Answer focuses on “JDK JRE JVM and JIT”.
1. What component is used to compile, debug, and run a Java program?
A JVM
B JDK
C JIT
D JRE
2. Which component is responsible for converting byte codes to machine specific code?
A JVM
B JDK
C JIT
D JRE
3. Which component is responsible for running the Java program?
A JVM
B JDK
C JIT
D JRE
4. Which component is responsible for optimizing byte-codes?
A JVM
B JDK
C JIT
D JRE
5. Which statement is true about Java?
A It is a platform independent programming language
B It is a platform dependent programming language
C It is a code dependent programming language
D It is a sequence dependent programming language
6. Which of the following is an invalid keyword with the main() method?
A public
B static
C private
D final
7. What is the file extension of a Java program?
A .class
B .java
C .txt
D .js
8. What is the extension of a compiled program?
A .class
B .java
C .txt
D .js
9. How can we identify if a compilation unit is a class or an interface from a .class file?
A Java Source File Header
B Extension of the compilation unit
C We can’t tell the difference between class and interface
D The name of the class or interface must be prefixed with the type of unit
10. What is the use of the interpreter?
A It converts byte code into machine language
B it is the intermediary between JIT and JVM
C They read high level code and run them
D Can replace JIT