Multiple choice technology programming languages

Assume you have created a piece of Java source code and compiled it successfully. How does the Java platform execute the code?

  1. The compiler interprets the bytecode in the Java class file

  2. The Java Virtual Machine (JVM) interprets the bytecode in the Java class file

  3. The JVM interprets the native machine code

  4. The JVM translates compiled bytecode to machine code

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

The Java platform uses the JVM to execute bytecode. The JVM can either interpret the bytecode directly or use JIT compilation to translate it to native machine code. The compiler's job ends after creating the class file - it doesn't execute code.