Apr 7, 2012

Compiling with Java

When using the JDK, the process of compiling is currently performed in a command line (shell environment). This section describes in detail how you use the Java tools; it steps you through creating and compiling your first Java program.

The first step is to run the text editor of choice and create the classic HelloWorld program. Type the following lines of source code exactly as written here:

    // HelloWorld.java
    class HelloWorld {
         public static void main (String args[]) {
         System.out.println("Hello World!");

Save the file as HelloWorld.java in the classes directory. Don't be concerned at this point with what this code means.



Post a Comment