the addAll(Collection c) method, simply appends c's elements to the end of the collection that the method was called from.
for example:
List<int> list1 = new ArrayList<>(Arrays.asList(1, 2, 5));
List<int> list2 = new ArrayList<>(Arrays.asList(2, 3, 6));
list1.addAll(list2);
for (int num : list1) {
System.out.print(num + " ");
}
The output of the above code-snippet is: 1 2 5 2 3 6