Java Foundations — Question 32
Which two statements are true about the Java Runtime Environment (JRE)?
Answer options
- A. It is responsible for garbage collection.
- B. It interprets bytecode stored in a .class file.
- C. It contains the JDK and Java APIs.
- D. It is platform independent.
- E. You must install the JRE to compile a .java file.
Correct answer: B, D
Explanation
Option B is correct because the JRE is indeed responsible for interpreting bytecode from .class files. Option D is also correct as the JRE allows Java applications to run on any platform without modification. Options A, C, and E are incorrect because garbage collection is managed by the JRE, but it does not contain the JDK, and the JRE is not required to compile .java files.