exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 89 discussion

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

Given:

And the code fragment:

Which code fragment, when inserted at line 14, enables the code to print Mike Found?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A

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
DarGrin
3 months, 1 week ago
A is correct
upvoted 1 times
...
a_really_reliable_programmer
4 months, 2 weeks ago
Compile Error... Line 11, ("Mike) -> Missing a quotation mark
upvoted 1 times
...
Vicky_65
9 months, 2 weeks ago
A is correct
upvoted 1 times
...
spongecodes
10 months, 1 week ago
A as new Person("Mike") will return a different object
upvoted 1 times
...
carloswork
1 year, 2 months ago
Answer is A. import java.util.ArrayList; import java.util.List; public class Patient { String name; public Patient (String name) { this.name = name; } } public static void main(String[] args) { List ps = new ArrayList(); Patient p2 = new Patient ("Mike"); ps.add(p2); /* A */ int f = ps.indexOf(p2); if (f >= 0) { System.out.println("Mike Found"); } }
upvoted 1 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