Home » Oracle » 1z0-808 v.2 » Which statement is true about Java byte code?
Which statement is true about Java byte code?
A. It can run on any platform.
B. It can run on any platform only if it was compiled for that platform.
C. It can run on any platform that has the Java Runtime Environment.
D. It can run on any platform that has a Java compiler.
E. It can run on any platform only if that platform has both the Java Runtime Environment and a Java compiler.
Correct Answer: D
Explanation/Reference:
Reference: http://www.math.uni-hamburg.de/doc/java/tutorial/getStarted/intro/definition.html
Explanation:
Java bytecodes help make "write once, run anywhere" possible. You can compile your program into bytecodes on any platform that has a Java compiler. The bytecodes can then be run on any implementation of the Java VM. That means that as long as a computer has a Java VM, the same program written in the Java programming language can run on Windows 2000, a Solaris workstation, or on an iMac.
Download Printable PDF. VALID exam to help you PASS.
|
 |
Answer C:
The bytecode is actually the already compiled java file which has the .class extension. So it can run in any platform that has the runtime environment.
JVM (or compiler) compiles Java source code into bytecode.
However this question is about the following step: The system needs JRE in order to interpret the bytecode and run it on the system.
So the correct answer should b C.
According to the “Explanation” the Answer is C
The answer is C. Once compiled, it can run on any platform that has installed the JVM