I am learning a Java certificate and I have a question that I know can be very simple. However, I'm not sure:
Question: Which statement is true regarding Java bytecode?
a) It can work on any platform.
b) It can work on any platform only if it has been compiled for that platform.
c) It can run on any platform that has a Java runtime.
d) It can work on any platform with a Java compiler.
e) It can work on any platform only if it has a Java Runtime Environment and a Java compiler.
I think (c) is the correct answer, assuming the Java runtime is an interpreter.
source
share