Latest web development tutorials

Eclipse Create Java Interface

Open the New Java Interface Wizard

New Java Interface Wizard can create a new Java interface. The wizard opens the way are:

  • Click the File menu and select New> Interface
  • Right-click in the Package Explorer window and select New> Interface
  • Drop-down box in the toolbar button ( new_java_interface_class_btn ) Select ( )

Before opening the Create Java Interface wizard, the best choice for good Java package name of an interface, so that when you create a Java interface package name field will be filled in automatically.


Use the New Java Interface Wizard

Java Interface Wizard popups you can do the following:

  • Confirm the folder name (Source Folder) and name the package (Package) is correct
  • Enter the interface name
  • Click Add (Add) button and select the interface that will be inherited
  • Choose whether to automatically generate comments
  • Click Finish (complete) button
new_java_interface_btn

Checking out your new java interfaces

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

new_java_interface_pe