This method appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
Syntax:
boolean addAll(Collection c)
Parameters: This function has a single parameter, i.e, Collection c, whose elements are to be appended to the list.
Returns: It returns true if the elements of specified list is appended and list changes.
Below programs show the implementation of this method.
Program 1:
Output:
[10, 15, 20]
[100, 200, 300]
[10, 15, 20, 100, 200, 300]
Program 2: Below is the code to show implementation of list.addAll() using Linkedlist.