3.15 |
Which of the following expressions evaluates to true? Select the two correct answers.
|
3.16 |
Which statements are true? Select the two correct answers.
|
3.17 |
Which statements are true about the lines of output printed by the following program? public class BoolOp { static void op(boolean a, boolean b) { boolean c = a != b; boolean d = a ^ b; boolean e = c == d; System.out.println(e); } public static void main(String[] args) { op(false, false); op(true, false); op(false, true); op(true, true); } } Select the three correct answers.
|
3.18 |
What happens during execution of the following program? public class OperandOrder { public static void main(String[] args) { int i = 0; int[] a = {3,6}; a[i] = i = 9; System.out.println(i + " " + a[0] + " " + a[1]); } } Select the one correct answer.
|
3.19 |
Which statements are true about the output of the following program? public class Logic { public static void main(String[] args) { int i = 0; int j = 0; boolean t = true; boolean r; r = (t & 0<(i+=1)); r = (t && 0<(i+=2)); r = (t | 0<(j+=1)); r = (t || 0<(j+=2)); System.out.println(i + " " + j); } } Select the two correct answers.
|