Hands on Testing Java

Creating a Driver Class

These directions are useful for CS 108 at Calvin College in Fall 2005.

  1. Select the package of the project where you want the new class to go.
  2. Right click and select New -> Class, or use New Class button on tool bar.
  3. In the New Java Class dialog box
    1. Make sure the package name is correct.
    2. Type in the name of the class in the Name field (usually Driver).
    3. Make sure that java.lang.Object is the name in the Superclass field.
    4. Click the check box to automatically generate the main() method.

The last step is optional, but then you'll have to add the main() method by hand:

public static void main(String[] args) {
}