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]
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.
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
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.
dya45792
Highly Voted 5 years, 4 months agokrkpnr
Highly Voted 5 years, 1 month agoRahulRajen777
3 years, 11 months agoTheeOne
Most Recent 2 months, 3 weeks agovic88
4 months, 2 weeks agoarjunrawatirissoftware
1 year, 6 months agofvelazqueznava
1 year, 6 months agoSreeni_A
1 year, 8 months agoVicky_65
2 years agojjgry
2 years, 1 month agoAnkit1010
2 years, 2 months agokkaayyyy
2 years, 6 months agokkaayyyy
2 years, 6 months agobrianhuang881215
3 years, 8 months agoalexandrustefanescu
3 years, 9 months agoAysegul
3 years, 10 months agoSSJ5
4 years agoSamAru
4 years, 9 months agomete23
5 years, 2 months ago