Hands on Testing Java: Lab #1
Eclipse, the Text Editor
Create a New Class
In Lab #1, you need a Java class named
MultiplyCLIDriver
. Modify the class and package names
appropriately for other tasks.
To add a new class in Eclipse
- Right click your "Hands on Testing Java" project in the Package
Explorer.
- Select New -> Java class.
- In the Package field, enter the appropriate
package name; e.g.,
edu.institution
.username
.hotj.lab01
If the package does not already exist, Eclipse will create it for
you.
- In the Name field, enter the name of your
class (e.g.,
MultiplyCLIDriver
).
- Make sure that the
public
modifier is
selected.
- All checkboxes should be unchecked.
- Hit the Finish button.
There are a few variations on these instructions which you might
find helpful:
- You can browse for the appropriate package with the
Browse... button.
- If you right-click on the appropriate package (inside
the project) in the Package Explorer to create the class, the
Package field will be set automatically.
The class you create comes up in the Eclipse editor.
Go back...