![]() |
VOOZH | about |
In Java, the addLast() method of the LinkedList class is used to add an element at the end of the list.
void addLast( E e)
Example: Here, we use the addLast() method to add elements at the end of the LinkedList.
The LinkedList is: [Geeks, for, Geeks] The new LinkedList is: [Geeks, for, Geeks, is, the, best, Coding, Platform]