The Java.util.LinkedList.listIterator() method is used to return a list-iterator containing the same elements as that of the LinkedList in proper and same sequence starting from a specific position or index number which is passed as a parameter to this method.
ListIterator new_list = LinkedList.listIterator(int index);
Parameters: The parameter index is an integer type value that specifies the position of the element from where ListIterator starts operating and returning values.
Return Value: The method returns the list created using ListIterator, starting from the specified index.
Below program illustrate the Java.util.LinkedList.listIterator() method:
LinkedList:[Geeks, for, Geeks, 10, 20] The list is as follows: Geeks 10 20
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
- CopyOnWriteArrayList listIterator() method in Java
- ArrayList listIterator() method in Java with Examples
- AbstractList listIterator() Method in Java with Examples
- Stack listIterator(int) method in Java with Example
- Stack listIterator() method in Java with Example
- Vector listIterator() method in Java with Examples
- List listIterator() Method in Java with Examples
- Retrieving Elements from Collection in Java (For-each, Iterator, ListIterator & EnumerationIterator)
- Java AbstractSequentialList | ListIterator()
- Difference between an Iterator and ListIterator in Java
- Enumeration vs Iterator vs ListIterator in Java
- ListIterator in Java
- Java.util.LinkedList.peek() , peekfirst(), peeklast() in Java
- Java.util.LinkedList.offer(), offerFirst(), offerLast() in Java
- Java.util.LinkedList.get(), getFirst(), getLast() in Java
- Java.util.LinkedList.indexOf(), lastIndexof() in Java
- Java.util.LinkedList.poll(), pollFirst(), pollLast() with examples in Java
- LinkedList removeFirst() Method in Java
- LinkedList add() Method in Java
- LinkedList getFirst() Method in Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.