Oracle
1Z0-815 · Question #72
What should keyword1 and keyword2 be respectively, in oreder to produce output 2345? int [] array = {1,2,3,4,5}; for (int i: array) { if ( i < 2) { keyword1 ; } System.out.println(i); if ( i == 3) {…
The correct answer is D. continue, continue. See the full explanation below for the reasoning.
Question
What should keyword1 and keyword2 be respectively, in oreder to produce output 2345? int [] array = {1,2,3,4,5}; for (int i: array) { if ( i < 2) { keyword1 ; } System.out.println(i); if ( i == 3) { keyword2 ; }}
Options
- Acontinue, break
- Bbreak, break
- Cbreak, continue
- Dcontinue, continue
How the community answered
(18 responses)- A11% (2)
- C6% (1)
- D83% (15)
Community Discussion
No community discussion yet for this question.