Oracle
1Z0-851 · Question #43
1Z0-851 Question #43: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #43. The question stem and answer options stay visible for context.
Question
Given: 11. public void go(int x) { 12. assert (x > 0); 13. switch(x) { 14. case 2: ; 15. default: assert false; 16. } 17. } 18. private void go2(int x) { assert (x < 0); } Which statement is true?
Options
- AAll of the assert statements are used appropriately.
- BOnly the assert statement on line 12 is used appropriately.
- COnly the assert statement on line 15 is used appropriately.
- DOnly the assert statement on line 18 is used appropriately.
- EOnly the assert statements on lines 12 and 15 are used appropriately.
- FOnly the assert statements on lines 12 and 18 are used appropriately.
- GOnly the assert statements on lines 15 and 18 are used appropriately.
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.