11) Assume that x and y are int variables with x = 5, y = 3, and a and d are char variables with a
= ‘a’ and d = ‘A’, and examine the following conditions:
Condition 1: (x < y && x > 0)
Condition 2: (a != d || x != 5)
Condition 3: !(true && false)
Condition 4: (x > y || a == ‘A’ || d != ‘A’)
A) All 4 Conditions are true
B) Only Condition 2 is true
C) Condition 2 and Condition 4 are true only
D) Conditions 2, 3 and 4 are all true, Condition 1 is not
E) All 4 Conditions are false
12) The break statement does which of the following?
A) ends the program
B) transfers control out of the current control structure such as a loop or switch statement
C) ends the current line of output, returning the cursor
D) denotes the ending of a switch statement
E) indicates the end of line when using System.out.print
13) If a break occurs within the innermost loop of a nested loop that is three levels deep
A) when the break is encountered just the innermost loop is “broken”
B) when the break is encountered, all loops are “broken” and execution continues from after the
while statement (in our example)
C) when the break is encountered, all but the outermost loops are broken, and execution
continues from the next iteration of the while loop (in our example)
D) this is a syntax error unless there are break or continue statements at each loop level
E) none of the above