Friday, July 6, 2007

Assignment No. 4: Familiarizing Common Compiling Errors in Java

Instruction:
Perform the following instructions on your computer. Write your actual sample Java programs and comment it with compiling errors it will produce in the compilation phase. The submission material should be computerized or a word-processor-generated.

Note: Do not predict the possible output or the compiling errors it will produce.

Points: 20 pts.

Problems:
  1. Create a small program that defines some fields. Try creating some illegal field names and see what kind of error the compiler produces. Use the naming rules and conventions as a guide from the course website.
  2. In the program you created in Exercise 1, try leaving the fields uninitialized and print out their values. Try the same with a local variable and see what kind of compiler errors you can produce. Becoming familiar with common compiler errors will make it easier to recognize bugs in your code.

No comments: