exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 30 discussion

Actual exam question from Oracle's 1z0-808
Question #: 30
Topic #: 1
[All 1z0-808 Questions]

Given the code fragment:

What is the result?

  • A. A B C Work done
  • B. A B C D Work done
  • C. A Work done
  • D. Compilation fails
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
M_Jawad
Highly Voted 5 years, 7 months ago
C is correct
upvoted 13 times
...
dya45792
Highly Voted 5 years, 7 months ago
Antwort C ist richtig , public static void main(String[] args) { String [] arr = {"A", "B" , "c", "D"}; for (int i = 0; i < arr.length; i++) { System.out.println(arr[i] + " "); if (arr[i].equals("C")) { continue; } System.out.println("Work done"); break; } } } A Work done
upvoted 10 times
juipeng
3 years, 2 months ago
String [] arr = {"A", "B" , "C", "D"}; //c should be capitalized
upvoted 1 times
...
...
vic88
Most Recent 8 months ago
Selected Answer: C
A work done. C is right
upvoted 2 times
...
MPignaProTech
9 months, 2 weeks ago
Selected Answer: C
Answer is C because of the break;
upvoted 1 times
...
duydn
1 year, 11 months ago
Selected Answer: C
C is correct because, the first loop reach break -> end the loop
upvoted 2 times
...
dsms
1 year, 12 months ago
Selected Answer: C
correct answer is C
upvoted 1 times
...
Kolodets
2 years, 3 months ago
inside the loop is the break => C
upvoted 1 times
...
Vicky_65
2 years, 4 months ago
Selected Answer: A
C is the correct.Because in first iteration it will print A and break the loop.
upvoted 1 times
...
jjgry
2 years, 4 months ago
Selected Answer: C
if condition is false the first time we go though the loop
upvoted 1 times
...
reem3
3 years, 8 months ago
the break statement is inside the loop :) so the answer is c
upvoted 2 times
...
alexandrustefanescu
4 years, 1 month ago
C ist richtig!
upvoted 2 times
...
SamAru
5 years, 1 month ago
Correct Answer is Option C
upvoted 1 times
...
mete23
5 years, 6 months ago
The correct answer is C. "A Work done" break; !!!
upvoted 2 times
...
v323rs
5 years, 6 months ago
The correct answer is "C". "A Work done"
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...