public class HelloWorldApp
{
public static void main(String arg[])
{
System.out.println(“Hello World!”);
}
}
Save this code in a file called
HelloWorldApp.java
Step 2:
Compile the application with the command line
> javac HelloWorldApp.java
This creates the class file (with the bytecode output):
HelloWorldApp.class
Step 3:
Use the java command to run the program:
> java HelloWorldApp
Hello World!