Complete listing of Hello1.java
/*File: Hello1.java
This is a very simple Java program. It
illustrates the basic structure of a Java
program, which requires a controlling class
with a main method. Also, global variables and
global methods are not allowed.
To compile this program on a computer with the
the Java JDK installed, enter the following
command at the command prompt:
javac Hello1.java
A successful compilation will produce a single
output file named Hello1.class
To run the program, enter the following command
at the command prompt in the directory
containing the class file:
java Hello1
************************************************/
class Hello1{
public static void main(String[] args){
System.out.println("Hello World");
}//end main
}//End Hello1 class
Listing 2
|