Eclipse tutoria...login
Eclipse tutorial
author:php.cn  update time:2022-04-13 14:09:28

Eclipse creates Java interface



Open the New Java Interface Wizard

The New Java Interface Wizard can create a new Java interface. The ways to open the wizard are:

  • Click the File menu and select New > Interface

  • Right-click the mouse in the Package Explorer window and select New > Interface

  • In the drop-down box button on the toolbar (class_dd_button.jpg) select (new_java_interface_btn.jpg)

Open Create Before entering the Java Interface Wizard, it is best to select the package name to which the Java interface belongs, so that the package name field will be automatically populated when creating the Java interface.


Use the New Java Interface Wizard

In the pop-up window of the Java Interface Wizard, you can perform the following operations:

  • Confirm the folder name ( Source Folder) and package name (Package) are correct

  • Enter the interface name

  • Click the Add button and select the interface to be The interface will be inherited

  • Select whether to automatically generate comments

  • Click the Finish button

new_java_interface_btn.jpg

View the new java interface

We can see the new interface in the Package Explorer view, and we can modify the interface code through the Java editor on the right.

new_java_interface_pe

php.cn