Open the New Class wizard.
Edit the Source Folder field as needed to indicate in which folder you want the new class to reside. You can either type a path or click the Browse button to find the folder. If a folder is found for the current selection, that folder appears in the Folder field as the container for the new class.
In the Package field, type or click Browse to select the package where you want the new class to reside. Leave this field empty to indicate that you want the new class to be created in the default package.
Leave the Enclosing Type box deselected.
In the Name field, type a name for the new class.
Select the public or default access modifier
using the Modifiers radio buttons.
Note: The private and protected options are available only when
creating a class enclosed in a type.
Optionally, select the abstract or final
modifier for the new class using the appropriate check boxes:
Note: The static option is available only when creating a class
enclosed in a type.
In the Superclass field, type or click Browse to select a superclass for the new class.
Click the Add button to add interfaces for the new class to implement.
If you want to create some method stubs in the new class:
Select the public static void main(String[] args) box if you want the wizard to add the main method to the new class, thus making it a starting point of an application.
Select the Constructors from superclass check box if you want the wizard to create, in the new class, a set of constructors, one for each of the constructors declared in the superclass. Each of them will have the same number of parameters (of the same types) as the respective constructor from the superclass.
Select the Inherited abstract methods check box if you want the wizard to generate method stubs for each of the abstract methods that the new class will inherit from its superclass and implemented interfaces.
Click Finish when you are done.
Creating a new Java class
Creating a nested class
Creating a class in an existing compilation
unit
New Java Project wizard
New Source Folder wizard
New Java Package wizard
New Java Class wizard
Java Toolbar actions