# Creating a nested interface

You can create interfaces that are enclosed in other types (that is, nested interfaces).

1. Open the New Java Interface wizard.
2. Edit the Source Folder field to indicate in which folder you want the new interface 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 Source Folder field as the container for the new interface.
3. Select the Enclosing type checkbox.
4. In the Enclosing type field, type the name of the enclosing type or click the Browse button to select the enclosing type for the new interface.
5. In the Name field, type a name for the new interface. (Optionally, in a 5.0 project, add type parameters enclosed in < and >).
6. Select the public or default access modifier by using the Modifiers radio buttons.
7. Select the static checkbox if you want the new interface to be static.
8. Click the Add button to add interfaces for the new interface to extend. (Optionally, in a 5.0 project, add type arguments enclosed in < and >).
9. Click Finish when you are done.

Note: The new interface is created in the same compilation unit as its enclosing type.

Java projects

Creating a new Java interface
Creating a top-level interface
Creating a new interface in a compilation unit
Renaming a type

New Java Interface wizard
Java Toolbar actions
Package Explorer