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

Eclipse creates a Java class


May 24, 2021 Eclipse


Table of contents


Open the new Java class wizard

You can create a Java class using the new Java class wizard, which you can open by:

  • Click on the "File" menu and select New and Class
  • Right-click the mouse in the Package Explorer window and select New and Class
  • Click the down button Eclipse creates a Java class of the class ( ) and select ( Eclipse creates a Java class )

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


Use the new Java class wizard

In the spring window of the Java class wizard, you can do the following:

  • Make sure that the folder name (Source Folder) and the package name (Package) are correct
  • Enter the class name
  • Select a different decorator class
  • Enter the name of superclass or click the Browse button to select an existing class
  • Click the Add button to select the interface implemented by the class
  • In the check box, you can choose how to create the method and whether to automatically generate comments
Eclipse creates a Java class
  • Click the Finish button

View the new Java class

In the Package Explorer view we can see the new class, and we can modify the code through the Java editor on the right.

Eclipse creates a Java class