Java OCA OCP Practice Question 67

Question

Which of the following is true of a Java byte code file?

  • A. It can be run on any computer with a compatible JVM.
  • B. It can only be executed on the same type of computer that it was created on.
  • C. It can be easily read and modified in a standard text editor.
  • D. It requires the corresponding .java that created it to execute.


A.

Note

A Java byte code file is a binary encoded set of instructions designed to be run on any computer with a compatible JVM, making Option A the only correct answer.

By compatible JVM, we mean one capable of running the class file.

For example, a Java 6 JVM may have trouble executing a Java 8 compiled file.

Option B is incorrect, and is more a facet of machine language compiled programming classes.

Option C is incorrect as binary data is not particularly human readable.

Option D is incorrect as the compiled file can be distributed without its .java source file and execute without issue.




PreviousNext

Related