You can create standalone classes that are not enclosed in other types.
1. |
Open the New Class wizard. See Opening the New Class Wizard |
2. |
If a folder is found for the current selection, that folder appears in the Folder field as the container for the new class. ![]() Edit the 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. |
3. |
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. |
4. |
Leave the Enclosing Type box unchecked. See Creating a Nested (i.e., Inner) Class |
5. |
In the Name field, type a name for the new class. |
6. |
Select the desired access modifier by using the Access Modifiers radio buttons.
Note: The private and protected options are available only when creating a class enclosed in a type. See Creating a Nested (i.e., Inner) Class |
7. |
Select the type modifiers for the new class by checking or clearing the appropriate check boxes:
Note: The static option is available only when creating a class enclosed in a type. See Creating a Nested (i.e., Inner) Class |
8. |
In the Superclass field, type or click Browse to select a superclass for the new class. |
9. |
Click the Add button to add interfaces for the new class to extend. |
10. |
If you want to create some method stubs in the new class:
|
11. |
Click Finish when you are done. |