go to previous page   go to home page   go to next page highlighting

Answer:

No.

The bytes in the file Hello.class are machine language for the Java Virtual Machine. These bytes of machine language do not usually correspond to printable characters (and when they do, it is only by accident.)


Contents of the Bytecode File

Enter the command TYPE (upper or lower case) at the command prompt to type a text file to the monitor:

TYPE source file

The TYPE command expects bytes that encode characters. It sends those bytes to the graphics board which puts each character on the monitor.

But what happens if you use TYPE with a bytecode file? The bytes of a bytecode do not usually encode characters:

TYPE class file

Mostly, typing a not-text file does not work. Some bytes do encode characters since the program contains the characters it sends to the monitor. Other characters are information for the run-time system.

Usually a file that contains bytes that do not correspond to characters is called a binary file. This is a somewhat misleading term since all files are composed of bytes, and all bytes contain binary patterns.


QUESTION 9:

What happens if you try to run the Java Virtual Computer on the source code?


go to previous page   go to home page   go to next page