Multiple choice

What is the purpose of the Java compiler?

  1. To transform Java code into instructions usable by a web browser

  2. To transform Java code into instructions usable by the JVM

  3. To transform Java code into instructions usable by the operating system

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The Java compiler (javac) translates human-readable Java source code into bytecode, which consists of instructions optimized for execution by the Java Virtual Machine (JVM). The JVM then translates this bytecode into machine-specific instructions for the host operating system.