Multiple choice technology programming languages

A program written in the Java programming language can run on any platform because...

  1. Java programming is derived from C++.

  2. The Java Virtual Machine1(JVM) interprets the program for the native operating system.

  3. The compiler is identical to a C++ compiler.

  4. The APIs do all the work.

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

Java programs achieve platform independence through the Java Virtual Machine (JVM). Java source code is compiled to bytecode, which the JVM interprets or compiles to native code for the specific platform. The JVM abstracts away platform-specific details, allowing the same bytecode to run anywhere. Option B is correct.