Adding Code to the Generated Source File
Because you have left the Create Main Class checkbox selected in the New
Project wizard, the IDE has created a skeleton class for you. You can add the
"Hello World!" message to the skeleton code by replacing the line:
// TODO code application logic here
with the line:
System.out.println("Hello World!");
Save the change by choosing File >: Save.
The file should look something like the following:
/* * HelloWorldApp.java * * Created on September 15, 2006, 5:27 PM * * To change this template, choose Tools >: Template Manager * and open the template in the editor. */
package helloworldapp;
/** * The HelloWorldApp class implements an application that * simply displays "Hello World!" to the standard output. */ public class HelloWorldApp {
/** Creates a new instance of HelloWorldApp */ public HelloWorldApp() { }
/** * @param args the command line arguments */ public static void main(String[] args) { //Display "Hello World!" System.out.println("Hello World!"); }
}
|