Eclipse Creating Java Interface
Open the New Java Interface Wizard
The New Java Interface Wizard allows you to create a new Java interface. You can open the wizard by:
Clicking the File menu and selecting New > Interface
Right-clicking in the Package Explorer window and selecting New > Interface
Using the dropdown button on the toolbar (
Before opening the Java Interface Creation Wizard, it's best to select the package name for the Java interface, so the package field is automatically populated when creating the Java interface.
Using the New Java Interface Wizard
In the Java Interface Wizard dialog, you can perform the following actions:
Verify the correctness of the folder name (Source Folder) and package name (Package)
Enter the interface name
Click the Add button and select the interface to be inherited
Choose whether to automatically generate comments
Click the Finish button
View the New Java Interface
In the Package Explorer view, we can see the newly created interface, and we can modify the interface code using the Java editor on the right.