Before using BlueJ you should create a folder named Programming 2 in your student folder on the I: drive.
- Open BlueJ
- From the Project menu select New Project…
- Navigate into the Programming 2 folder in your student folder on the I: drive
- Give the file an appropriate name. For example, Problem Set 1.
- Press Create
- Press the New Class… button
- Give the class an appropriate name such as Num1 or Prob1 (no spaces or punctuation allowed, can’t begin with a number)
- Select Class for Class Type
- Press OK
- Double-click the class icon that appeared.
- In the code window that opens, write your code between the opening and closing braces of the main method.
- Press the Compile button (in either the project window or the code window). If there are no errors in the code then the compiling will be successful as indicated by the class icon losing its diagonal stripes.
- Right-click on the compiled class icon and choose void main(String[]args)
- Press OK
- View the program’s output in the Terminal Window. (It is a good idea to select ‘Clear screen at method call” from the Options menu in the Terminal Window. This will cause the computer to erase output from previous program runs)
|