Java SE 8 Programmer I — Question 7
Which statement is true about Java byte code?
Answer options
- 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: C
Explanation
The correct answer is C because Java byte code is designed to be executed on any platform that has the Java Runtime Environment (JRE), which interprets the byte code. Options A, B, D, and E are incorrect because they either misrepresent the requirements for running Java byte code or incorrectly state that a Java compiler is needed, which is not the case for execution.