exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 26 discussion

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

Given the code fragment:

What is the result?

  • A. [Robb, Rick, Bran]
  • B. [Robb, Rick]
  • C. [Robb, Bran, Rick, Bran]
  • D. An exception is thrown at runtime.
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
dya45792
Highly Voted 5 years, 4 months ago
antwort A ist richtig; public static void main (String [] args ) { List <String> names = new ArrayList<>(); names.add("Robb"); names.add("Bran"); names.add("Rick"); names.add("Bran"); if (names.remove("Bran")) { names.remove("Jon"); } System.out.println(names); } } [Robb, Rick, Bran]
upvoted 15 times
...
krkpnr
Highly Voted 5 years, 1 month ago
correct answer is Hodor.
upvoted 9 times
RahulRajen777
3 years, 11 months ago
too much of GOT .. lead these kind of injuries..:P
upvoted 1 times
...
...
TheeOne
Most Recent 2 months, 3 weeks ago
Selected Answer: A
Answer = A. [Robb, Rick, Bran] -The remove method in Java's List interface: Removes the first occurrence of the specified element from the list (if it exists). Returns true if the list contained the element and it was successfully removed. Returns false if the list did not contain the element.
upvoted 1 times
...
vic88
4 months, 2 weeks ago
Selected Answer: A
answer is A
upvoted 1 times
...
arjunrawatirissoftware
1 year, 6 months ago
Answer - A
upvoted 1 times
...
fvelazqueznava
1 year, 6 months ago
Selected Answer: A
A is the right one
upvoted 1 times
...
Sreeni_A
1 year, 8 months ago
Correct answer is A Robb Rick Bran
upvoted 1 times
...
Vicky_65
2 years ago
Selected Answer: A
A is the correct
upvoted 1 times
...
jjgry
2 years, 1 month ago
Selected Answer: A
.remove only removes first occurence
upvoted 2 times
...
Ankit1010
2 years, 2 months ago
A is correct [Robb, Rick, Bran]
upvoted 1 times
...
kkaayyyy
2 years, 6 months ago
if condition removes first occurrence of Bran from the list and also returns True. Therefore at the end Bran is removed
upvoted 1 times
kkaayyyy
2 years, 6 months ago
ANSWER IS "A"
upvoted 1 times
...
...
brianhuang881215
3 years, 8 months ago
FIFO for Arraylist just like queue in data structure
upvoted 3 times
...
alexandrustefanescu
3 years, 9 months ago
Answer is A correct!
upvoted 1 times
...
Aysegul
3 years, 10 months ago
answer is B
upvoted 1 times
...
SSJ5
4 years ago
Correct Answer is A
upvoted 1 times
...
SamAru
4 years, 9 months ago
Answer is A.
upvoted 2 times
...
mete23
5 years, 2 months ago
the answer A - correct. [Robb, Rick, Bran]
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