Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Anderson McCord

Prelab 1

1.Answer the following questions from pages 109-113

1) C
2) B
3) A
4) C
5) ACD

16) True

17) True

18) False

1) freeze 0

boil 100

2) y * 4 +

2+

3) I am the incredible computing

machine

and I will

amaze

you

4) Being case sensitive implies that the program can tell the difference in
capitalization of characters that are used as code. This would allow a variable
known as Variable1 to differ from another variable known as VARIABLE1. It is
important as a programmer to maintain consistency throughout your code with
regards to capitalization to prevent mislabeling code.

5) print and println are both methods of the out object which is a member of the
system class its self.
6) Declaring a variable tells the compiler the starting value of that variable.

2.Find the Nine Errors in the Following Program

1: // on comment line

2: Incorrect bracket usage; should be { instead of }

3&4: println requires double quotes not single

5: variable a is case sensitive

6: missing ; after integer method

7: missing ; after defining a

8: unnecessary spaces after println

9: Missing close bracket at end of program

You might also like