Creating a new interface in an existing compilation unit

An alternative way to create a new interface is to add it to an existing compilation unit.

  1. In the Package Explorer, double-click a compilation unit.

  2. Type the code for the interface at the desired position in the compilation unit.

Related concepts

Java projects

Related tasks

Creating Java elements
Creating a new Java interface
Creating a nested interface
Creating a top-level interface
Renaming a compilation unit

Related reference

Package Explorer

Legal notices