Creating a Class

With the org.eclipseguide package highlighted, select File → New → Class or click on the New Java Class icon (). Enter the name of the class, starting with a capital letter. For this example, enter Hello.

Under the section of the dialog that asks which method stubs you would like to create, select the option to create public static void main(String[] args).

Leave the rest of the options set to their default values and click Finish. Eclipse will generate the code for the class for you (this generated class is shown in Figure 14), and open the Java editor with your new class in view.

Tip

Whenever Eclipse generates code, it inserts TODO comments to indicate the places you need to edit. Every place in the code that has a TODO comment is listed in the Tasks view (see Part VII).

Get Eclipse IDE Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.