Create a file called HelloWorld.java:
Code:
import java.lang.System;
public class HelloWorld {
public static void main(String argv[]) {
System.out.println("Hello, world of Java.\n");
}
}
Compile this code with the command:
Code:
javac HelloWorld.java
Run it with this command: