-
In the Project tool window, select the destination package.
Choose or press Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertCtrl+N or Alt+InsertAlt+InsertAlt+InsertControl N or Control EnterControl N or Control EnterMeta N or Control Enter.
Alternatively, right-click the package and select New from the context menu.
-
In the menu, select .

-
In the Create New Class dialog:
- Type the name of the entity you are creating in the Name field. Don't type the file name extension.
- Select the kind of symbol to be created from the Kind list. Note that you can use the UpUpUpUpUp or Ctrl+PUpUpUpUpUpUpUp or Control P and DownDownDownDownDown or Ctrl+NDownDownDownDownDownDownDown or Control N arrow keys to browse the contents of this list.
- Click OK.

IntelliJ IDEA generates a file with the specified name and the corresponding extension (.java), and opens this file in the editor.
Tip
When specifying the name of the symbol to be created, you can type the names of packages separated with dots in front of the symbol name.

As a result, IntelliJ IDEA, in addition to creating the symbol, will also make the necessary changes to packages. Depending on the situation, the current package may be renamed or an appropriate package structure may be generated.


