Read the following case study and answer the questions given below by choosing the correct option: Java compilation is different from the compilation of other high-level languages. Other high-level languages use an interpreter or a compiler, but in Java the source code is first compiled to produce an intermediate code called the byte code. This byte code is platform independent and is a highly optimised set of instructions designed to be executed by the Java run-time system called the JVM (Java Virtual Machine). The JVM is a Java interpreter loaded into computer memory as soon as Java is loaded. The JVM is different for different platforms.
JAVA source code is compiled to produce:
Topic: Bytecode
Try it
Pick an option and check your answer. The full worked answer is below either way.
Answer
(b) Byte code.
The compiler produces BYTECODE, stored in a .class file. It is called an intermediate code because it is neither the human-readable source nor the processor’s own machine code — it sits between them, ready for any JVM to interpret. Object code and machine code are the output of languages such as C, which compile directly for one particular processor.
Byte code.