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, 7 months agokrkpnr
Highly Voted 5 years, 4 months agoRahulRajen777
4 years, 2 months agoTheeOne
Most Recent 6 months agovic88
7 months, 3 weeks agoarjunrawatirissoftware
1 year, 9 months agofvelazqueznava
1 year, 9 months agoSreeni_A
1 year, 11 months agoVicky_65
2 years, 3 months agojjgry
2 years, 4 months agoAnkit1010
2 years, 5 months agokkaayyyy
2 years, 9 months agokkaayyyy
2 years, 9 months agobrianhuang881215
3 years, 11 months agoalexandrustefanescu
4 years agoAysegul
4 years, 1 month agoSSJ5
4 years, 4 months agoSamAru
5 years agomete23
5 years, 5 months ago