Eclipse 简明教程
Eclipse - Create Java Class
Opening the New Java Class Wizard
您可以使用新建 Java 类向导来创建 Java 类。可以通过多种方式调用 Java 类向导 -
You can use the New Java Class wizard to create a Java class. The Java Class wizard can be invoked in different ways −
-
By clicking on the File menu and selecting New → Class.
-
By right clicking in the package explorer and selecting New → Class.
-
By clicking on the class drop down button ( ) and selecting class ( ).
如果可能,请在启动新建 Java 类向导之前选择将创建类的软件包,以便向导可以自动填充软件包名称。
Before bringing up the New Java Class wizard, if possible, select the package in which the class is to be created so that the wizard can automatically fill in the package name for you.
Using the New Java Class Wizard
显示 java 类向导后 -
Once the java class wizard comes up −
-
Ensure the source folder and package are correct.
-
Enter the class name.
-
Select the appropriate class modifier.
-
Enter the super class name or click on the Browse button to search for an existing class.
-
Click on the Add button to select the interfaces implemented by this class.
-
Examine and modify the check boxes related to method stubs and comments.
-
Click the Finish button.