Eclipse Create Java Interface - Eclipse

How to create a Java interface in Eclipse?

Opening a New Java Interface Wizard

New Java Interface wizard can be used for creating a new java interface. There are many ways of opening this wizard

  • Click on the File menu and select New → Interface.
  • Right click in the package explorer and select New > Interface.
  • Click on the class drop down button (new_java_interface_class_btn ) in the tool bar and select Interface (new_java_interface_btn ).

Before bringing up a New Java Interface wizard, if possible, select the package in which the interface has to be created so that the wizard automatically fills in the package name for you.

Using the New Java Interface Wizard

Once the java interface wizard comes up

  • Make sure that the source folder and package are correct.
  • Enter interface name.
  • Click on Add button to select the extended interfaces.
  • Select the Generate comments check box if you like comments to be generated.
  • Click on Finish button.

new_java_interface

Viewing the Newly Created Java Interface

Newly created interface will appear in the Package Explorer view and a java editor instance which helps in modifying the new interface to appear in the editor area.

new_java_interface_pe

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Eclipse Topics