nerdexam
Oracle

1Z0-811 · Question #14

Which two statements are true about the Java Runtime Environment (JRE)?

The correct answer is B. It interprets bytecode stored in a .class file. B is correct because the JRE contains the JVM (Java Virtual Machine), which reads and executes the platform-neutral bytecode stored in .class files - this is the JRE's core purpose. Why the distractors are wrong: A - Garbage collection is performed by the JVM, a component…

Java Basics

Question

Which two statements are true about the Java Runtime Environment (JRE)?

Options

  • AIt is responsible for garbage collection.
  • BIt interprets bytecode stored in a .class file.
  • CIt contains the JDK and Java APIs.
  • DIt is platform independent.
  • EYou must install the JRE to compile a .java file.

How the community answered

(44 responses)
  • B
    91% (40)
  • C
    2% (1)
  • D
    5% (2)
  • E
    2% (1)

Explanation

B is correct because the JRE contains the JVM (Java Virtual Machine), which reads and executes the platform-neutral bytecode stored in .class files - this is the JRE's core purpose.

Why the distractors are wrong:

  • A - Garbage collection is performed by the JVM, a component inside the JRE, not by the JRE itself as a whole; the distinction matters on exams.
  • C - The relationship is reversed: the JDK contains the JRE (plus development tools like the compiler), not the other way around. The JRE does include Java APIs, but never the JDK.
  • D - The JRE is platform-dependent - you download a different JRE for Windows, macOS, or Linux. It's the bytecode that is platform-independent ("write once, run anywhere").
  • E - To compile a .java file you need the JDK (specifically javac). The JRE only handles running already-compiled .class files.

Memory tip: Use the hierarchy JDK ⊃ JRE ⊃ JVM - each layer contains the next. Developers need the JDK; end users only need the JRE to run programs; the JVM inside the JRE is what actually executes bytecode.

Topics

#JRE#Bytecode Interpretation#Garbage Collection#JVM

Community Discussion

No community discussion yet for this question.

Full 1Z0-811 Practice