Reputation: 219
How do I append the contents of one list at the end of another list?
Upvotes: 20
Views: 21485
Reputation: 137
List finalist = a + b
Example:
List a = [1,4] List b = [2,3] List c = a+b
Result:
c = [1, 4, 2, 3]
Upvotes: 4
Reputation: 2477
listA.addAll(listB)
Upvotes: 10
Reputation: 48369
List.addAll()
Upvotes: 54