A good answer might be:
|
Between the BracesAll of our small Java programs will look something like this:
Everything that a program can do will be described inside the first
brace and the final, matching brace of a class.
To start with,
there will be only one class per source code file,
but in later chapters there may be several classes per source code file.
The example program writes "Hello World!" to the monitor.
This looks like a lot of lines for doing such a little task.
Usually programs have many more lines and the lines you see here
help to keep them organized.
The line
shows where the program will start running. The wordpublic static void main ( String[] args ) main means that this is the
main method --- where the Java virtual machine will start running
the bytecode version of the program.
The main method of this program consists of a single statement:
This statement
writes the characters inside the quotation marks to
the monitor of the computer system.
|
QUESTION 3:Say that the file "Hello.java" contains the example program. The file is contained in the subdirectory "C:\Temp" on the hard disk. In order to run it, what two things must be done? Click Here after you have answered the question |