| |
Now fire up TextPad and open a new file in the samedirectory. (Remember to use your middle mouse button to select fromthe menu. You may have to double click.) Call this fileFirstSample.java.
Now copy out the FirstSample.java program from yournotes. Compile it and run it. Think about the syntax. Make somedeliberate mistakes (such as leaving out semi-colons) and get the hangof the error messages.
Now modify the program (maybe renaming it to FirstSample1) to useprint rather than println. Fool with it until you get decent lookingoutput.
Do not rush this exercise. Spend as much time as you need to feelconfident with the editor and the Java system. Try out some of theother simple shell commands that we covered in lectures. (Rememberman for help on shell commands)
If you have time, trywriting more simple programs which actually perform calculations.