The correct answer is that Java source code is compiled into bytecode, which is then run on a Java Virtual Machine (JVM). Java is a compiled language, but unlike languages such as C++ that compile directly to native machine code, Java compiles to an intermediate language called bytecode. This bytecode is not executed directly by the computer's CPU but by the JVM. This architecture allows Java code to be platform-independent ("write once, run anywhere"), as the JVM handles the translation to the specific machine's architecture.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.