APPLICATION SYSTEM SOFTWARE
SYSTEMS SOFTWARE
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
____ compiled into machine code that runs on any OS
|
|
____ compiled into different versions of machine code for different versions of OS
|
|
____ compiled into versions of assembler code for each different OS
|
|
____ compiled into bytecode and run in a virtual machine
|
Detailed explanation-1: -In Java, programs are not compiled into executable files; they are compiled into bytecode (as discussed earlier), which the JVM (Java Virtual Machine) then executes at runtime. Java source code is compiled into bytecode when we use the javac compiler. The bytecode gets saved on the disk with the file extension .
Detailed explanation-2: -(Java uses a compiler to translate java programs into Java Bytecode, which is a machine language for the imaginary Java Virtual Machine. Java Bytecode programs are then executed by an interpreter.)
Detailed explanation-3: -Bytecode in Java is the reason java is platform-independent, as soon as a Java program is compiled bytecode is generated. To be more precise a Java bytecode is the machine code in the form of a . class file. A bytecode in Java is the instruction set for Java Virtual Machine and acts similar to an assembler.
Detailed explanation-4: -Java Virtual Machine, abbreviated as JVM, enables a computer to run code written in Java. When a Java program is compiled, the bytecode gets generated. It is equivalent to the assembler in C++. Bytecode is a platform-independent set of instructions primarily because it is interpreted and executed by the JVM.