|
Programming in Java for the First Time
We are going to type a simple program in notepad:
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}
Save this as HelloWorldApp.java in a directory on your h: drive
Now in the command prompt (Start-run-cmd)
Set the path to the compiler:
type:
path C:\Program Files\Java\jdk1.6.0_16\bin
Lets compile the program and then run it.
|