exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 29 discussion

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

Given the code fragment:

Which code fragment, when inserted at line 3, enables the code to print 10:20?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: B

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
namaoo
4 months, 3 weeks ago
B is the answer tried and tested
upvoted 1 times
...
Kolodets
9 months, 1 week ago
array needs 2 slots => A not correct
upvoted 1 times
...
Vicky_65
10 months ago
B is the valid array declaration and initialization.
upvoted 2 times
...
Ankit1010
11 months, 4 weeks ago
B is correct. C is wrong because of msissing [] in the left side
upvoted 2 times
...
kkaayyyy
1 year, 3 months ago
B is the correct answer. The only difference is we first declare the array and then initialize it.
upvoted 1 times
...
iSnover
1 year, 3 months ago
Letter B is correct and does not need to analyze too much. The letters A and D will give ArrayIndexOutOfBounds as they are creating an array with 1 space. The letter C is wrong because the "int array" needs to put the "int [] array" because the array type is instantiated like this.
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago