Get LinkedList elements
- 5th Sep 2018
- 0
- 4813
- different get methods in linkedlist get methods in linkedlist how to get elements in linkedlist java
We can use get() method for retrieving the element from LinkedList There are 3 different get() methods in LinkedList 1) Object get(int index); 2) Object getFirst(); 3) Object getLast(); Let’s discuss these methods with example Object get(int index) It returns the value present at the specified index This method throws IndexOutOfBoundsException if the index is […]