Holmes 3rd Trimester Final
Holmes 3rd Trimester Final
26. The operator that combines two conditions into a single Boolean value that is
true only when both of the conditions are true, but is false otherwise, is
.
a. $$
b. !!
c. ||
d. &&
27. The operator that combines two conditions into a single Boolean value that is
true when at least one of the conditions is true is .
a. $$
b. !!
c. ||
d. &&
29. Assuming a variable y has been assigned the value 6, the value of !(y < 7)
is .
a. 6
b. 7
c. true
d. false
33. If total = 100 and amt = 200, then after the statement total += amt.
a. total is equal to 200
b. total is equal to 300
c. amt is equal to 100
d. amt is equalto300
37. For how many integers does the following statement reserve room?
int[] value = new int[34];
a. 0
b. 33
c. 34
d. 35
38 If you declare an array as follows, how do you indicate the final element of
the array?
int[] num = new int[6];
a. num[0]
b. num[5]
c. num[6]
d. impossible to tell
39. If you declare an integer array as follows, what is the value of num[2]?
int[] num = {101, 202, 303, 404, 505, 606};
a. 101
b. 202
c. 303
d. impossible to tell