Oracle
1Z0-850 · Question #16
1Z0-850 Question #16: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-850 to reveal the answer and full explanation for question #16. The question stem and answer options stay visible for context.
Question
Given:
6. int time = 12;
7. if ( time < 12 ) {
8. System.out.println("Good morning");
9. }
10. // insert code here
11. System.out.println("Good afternoon");
12. }
13. else if ( time >= 18 ) {
14. System.out.println("Good evening");
15. }
Which three, inserted independently at line 10, produce the output Good afternoon? (Choose three.)
Options
- Aelse if (time > 12 || time <= 18) {
- Belse if (time > 12 && time <= 18) {
- Cif (time >= 12 && time < 18) {
- Delse if (time >= 12 || time < 18) {
- Eelse if (time < 12 || time > 18) {
Unlock 1Z0-850 to see the answer
You've previewed enough free 1Z0-850 questions. Unlock 1Z0-850 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.