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.
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.
Correct Answer: A [Robb, Rick, Bran]
public boolean remove(Object o)
Removes the first occurrence of the specified element from this list, if it is present (optional operation). If this list does not contain the element, it is unchanged.
Definitely A.
Answer: A
output:
[Robb, Rick, Bran]
a
Did exam MAY 17, 2017…This question was seen
Answer: A