Create Project

Once eclipse is started, make sure the project created in our previous lab ('LabAssignments') is visible and open.

First, create a class and name it "ScannerInput". In the following steps, we will create ScannerInput.java with only a main method in it.

Following are the steps.

  1. Create a new package with the name “lab2” by right clicking on the “src” folder, selecting New → Package, and setting the name as “lab2”.

  2. Create a new class with the name “ScannerInput” by right clicking on the package “lab2”, selecting New → Class, and setting the name as “ScannerInput”. Also create the static main method stub by selecting the checkbox for stubs.

The "ScannerInput" class is generated by Eclipse with a main method stub.