Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Eclipse creates a Java interface


May 24, 2021 Eclipse


Table of contents


Open the new Java interface wizard

The new Java interface wizard can create a new Java interface. The wizard opens by:

  • Click on the File menu and select New and Interface
  • Right-click the mouse in the Package Explorer window and select New and Interface
  • In the pull-down box Eclipse creates a Java interface button on the toolbar ( ) select ( Eclipse creates a Java interface )

Before you open the Create Java Interface wizard, it's a good idea to select the package name to which the Java interface belongs, so that the package name field is automatically populated when the Java interface is created.


Use the new Java interface wizard

In the spring window of the Java Interface Wizard, you can do the following:

  • Make sure that the folder name (Source Folder) and the package name (Package) are correct
  • Enter the name of the interface
  • Click the Add button and select the interface you want, which will be inherited
  • Choose whether to automatically generate comments
  • Click the Finish button
Eclipse creates a Java interface

View the new java interface

In the Package Explorer view we can see the new interface, which we can modify through the Java editor on the right.

Eclipse creates a Java interface