Which of the following statements is true?

2013

Which of the following statements is true?

  1. A.

    The JAVA compiler produces a code for JVM, which is executed by a JAVA interpreter.

  2. B.

    The JAVA compiler produces a code directly for JAVA interpreter.

  3. C.

    The JAVA compiler directly executes code in JVM.

  4. D.

    The JAVA compiler helps in directly executing a code on different operating systems.

Attempted by 317 students.

Show answer & explanation

Correct answer: A

Correct statement: The Java compiler converts source code into bytecode for the JVM, and this bytecode is executed by the JVM (often called the Java interpreter historically). How it works: The Java compiler (javac) translates .java source files into platform-independent bytecode stored in .class files.

Explore the full course: Up Lt Grade Assistant Teacher 2025