// HelloWorld.java // First Java program, to get experience with using the Java tools class HelloWorld { public static void main (String args[]) { System.out.println("Hello, World!"); } }
To compile this program, enter the command:javac HelloWorld.java
This will produce the binary bytecode file HelloWorld.class as output.
To execute this program, enter the command:java HelloWorld
Hello, World!
should appear on your terminal.