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 compiler is identical to a C++ compiler.

  3. The APIs do all the work.

  4. The Java Virtual Machine(JVM) interprets the program for the native operating system.

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

Java achieves platform independence through the JVM, which interprets compiled bytecode for each specific operating system. This 'write once, run anywhere' capability is Java's hallmark. Option A is irrelevant - derivation from C++ doesn't enable cross-platform execution. Option B is false - Java compilers are distinct from C++ compilers. Option C overstates API capabilities.