Creating a Java Application
Let’s start by creating a simple Java application: the classic Hello World example that all language books use to begin. As with all programming languages, your Java source files are created in a plain text editor, or in an editor that can save files in plain ASCII without any formatting characters. On Unix, emacs, ped, or vi will work; on Windows, Notepad or DOS Edit are both text editors.
class HelloWorld
{
public static void main (String args[])
{
Sytem.out.println(“Hello World!”);
}
}
To compile your Java program, Make sure the javac program
is in your execution path and type
javac
followed by the name of your source file:
javac HelloWorld.java