Methods in LinkedList
- 4th Sep 2018
- 0
- 5962
- different methods of linkedlist linked list add and remove with example Linked list methods in java Some of the Methods in LinkedList
boolean add(Object element) It adds an element to the end of the list. list.add("java"); list.add(“java”); Above line adds the string “java” to the end of the linked list. void add(int index, Object item) It adds an element at the given index of the list. list.add(2, "welcome"); list.add(2, “welcome”); This will add the string “welcome” at […]