exam questions

Exam 1z0-809 All Questions

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

Exam 1z0-809 topic 1 question 203 discussion

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

Given the code fragment:

What is the result?

  • A. 0 : 0 : pen
  • B. 0 : 1 : pen
  • C. 0 : pen
  • D. 0 : 1 : 2 : 3 : 4 :
  • E. A compilation error occurs.
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
LocalHero
2 months ago
list.contains("string") is end first index.
upvoted 1 times
...
steefaand
5 months ago
Selected Answer: C
C is correct after fixing typos.
upvoted 1 times
...
duydn
9 months, 3 weeks ago
Selected Answer: C
C. code: public static void main (String[] args) throws InterruptedException, ExecutionException { List<String> li = Arrays.asList("pen", "a", "pencil"); Predicate<String> test = s -> { int i = 0; boolean result = s.contains("pen"); System.out.print(i++ + ":"); return result; }; li.stream().filter(test).findFirst().ifPresent(System.out::println); }
upvoted 2 times
...
balike
2 years ago
Selected Answer: C
C,tested
upvoted 2 times
...
WilsonKKerll
2 years, 3 months ago
C, Tested.
upvoted 2 times
...
Svetleto13
3 years, 1 month ago
C,tested
upvoted 4 times
...
jduarte
3 years, 5 months ago
Answer C. Tested
upvoted 4 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