![]() addAll(int index, Collection c) This method Inserts all of the elements in the specified collection into this list, starting at the specified position. ![]() add(E e) This method Appends the specified element to the end of this list. If we wish to create a LinkedList with the name ll, then, it can be created as: LinkedList ll = new LinkedList(C) Methods for Java LinkedList Method Description add(int index, E element) This method Inserts the specified element at the specified position in this list. LinkedList(Collection C): This constructor is used to create an ordered list that contains all the elements of a specified collection, as returned by the collection’s iterator. If we wish to create an empty LinkedList with the name ll, then, it can be created as: LinkedList ll = new LinkedList() Ģ. ![]() LinkedList(): This constructor is used to create an empty linked list.
0 Comments
Leave a Reply. |