Assertions
© examsiri.com
Question : 3 of 6
Marks:
+1,
-0
Given:
Which statement is true?
1. int z = 5;
2.
3. public void stuff1(int x) {
4.   assert (x > 0);
5.   switch(x) {
6.    case 2: x = 3;
7.    default: assert false; } }
8.
9. private void stuff2(int y) { assert (y < 0); }
10.
11. private void stuff3() { assert (stuff4()); }
12.
13. private boolean stuff4() { z = 6; return false; }Which statement is true?
Go to Question: