- Select your Java project and choose File->New->Other->Java->Class, as shown in the following illustration.
Java Class appears, as shown in the following illustration.
- Navigate to the folder where you want the Java source file to reside by choosing Browse next to Source Folder.
- If your new Java class is a part of a package, enter the fully-qualified package name in Package.
- Enter a name for your class in Name.
- Choose Public in Modifiers.
- In Superclass, accept the default superclass, java.lang.Object, or browse for the class you want your class to extend.
- Choose Add next to Interfaces to specify an interface that the new Java class implements.
- In Which method stubs would you like to create?, choose Inherited abstract methods
- In Do you want to add comments as configured in the properties of the current project?, choose Generate comments.
- Choose Finish.
A Java editor view appears containing your new Java class, similar to the following illustration.
The comments that begin // TODO are those that are generated when you choose Generate comments.