Lab 0 -- CISC 1115
The purpose of this lab is to accustom you to the process of running a Java program.
There are 4 basic steps:
- Type up the program.
- Save the program.
- Compile and Run.
- Print program and output.
STEP 1: Type up the "hello world" program that we discussed in class, changing the message to say "hello" followed by
your name. Make sure that you follow the indentation pattern shown in class and in the book. Indent the body of the program (the part between the curly braces) 5 spaces.
STEP 2: Save the program
Make sure that the filename extension is .java
STEP 3: Compile and Run
This is really two separate steps, but you can click on a single button in the IDE to accomplish both steps.
STEP 4: Printing Output:
One way to print the output is to copy the contents of the screen to a file, and then print the file.
By right clicking on the MS DOS window, you can choose Select All. Right click on the title bar and choose Edit and then Copy. Then, paste into a word processor or notepad.