AbstractList listIterator() Method in Java with Examples Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report The listIterator() method of java.util.AbstractList class is used to return a list-iterator containing the same elements as that of the AbstractList in proper and same sequence starting from a specific position or index number which is passed as a parameter to this method. Syntax: ListIterator new_list = AbstractList.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 AbstractList.listIterator() method: Program 1: Java // Java code to illustrate listIterator() import java.util.*; public class LinkedListDemo { public static void main(String args[]) { // Creating an empty AbstractList AbstractList<String> abs_list = new LinkedList<String>(); // Use add() method to add elements in the list abs_list.add("Geeks"); abs_list.add("for"); abs_list.add("Geeks"); abs_list.add("10"); abs_list.add("20"); // Displaying the AbstractList System.out.println("AbstractList:" + abs_list); // Setting the ListIterator at a specified position ListIterator list_Iter = abs_list.listIterator(2); // Iterating through the created list from the position System.out.println("The list is as follows:"); while (list_Iter.hasNext()) { System.out.println(list_Iter.next()); } } } Output: AbstractList:[Geeks, for, Geeks, 10, 20] The list is as follows: Geeks 10 20 Program 2: Java // Java code to illustrate listIterator() import java.util.*; public class LinkedListDemo { public static void main(String args[]) { // Creating an empty AbstractList AbstractList<Integer> abs_list = new LinkedList<Integer>(); // Use add() method to add elements in the list abs_list.add(10); abs_list.add(20); abs_list.add(30); abs_list.add(40); abs_list.add(50); // Displaying the AbstractList System.out.println("AbstractList:" + abs_list); // Setting the ListIterator at a specified position ListIterator list_Iter = abs_list.listIterator(2); // Iterating through the created list from the position System.out.println("The list is as follows:"); while (list_Iter.hasNext()) { System.out.println(list_Iter.next()); } } } Output: AbstractList:[10, 20, 30, 40, 50] The list is as follows: 30 40 50 Create Quiz Comment C chinmoy lenka Follow 1 Improve C chinmoy lenka Follow 1 Improve Article Tags : Misc Java Java-Collections Java - util package Java-Functions Java-AbstractList +2 More Explore Java BasicsIntroduction to Java3 min readJava Programming Basics9 min readJava Methods6 min readAccess Modifiers in Java4 min readArrays in Java7 min readJava Strings7 min readRegular Expressions in Java3 min readOOP & InterfacesClasses and Objects in Java5 min readAccess Modifiers in Java4 min readJava Constructors4 min readJava OOP(Object Oriented Programming) Concepts10 min readJava Packages2 min readJava Interface7 min readCollectionsCollections in Java12 min readCollections Class in Java13 min readCollection Interface in Java4 min readIterator in Java4 min readJava Comparator Interface5 min readException HandlingJava Exception Handling6 min readJava Try Catch Block4 min readJava final, finally and finalize4 min readChained Exceptions in Java3 min readNull Pointer Exception in Java5 min readException Handling with Method Overriding in Java4 min readJava AdvancedJava Multithreading Tutorial3 min readSynchronization in Java7 min readFile Handling in Java4 min readJava Method References9 min readJava 8 Stream Tutorial7 min readJava Networking6 min readJDBC Tutorial5 min readJava Memory Management3 min readGarbage Collection in Java6 min readMemory Leaks in Java3 min readPractice JavaJava Interview Questions and Answers15+ min readJava Programs - Java Programming Examples7 min readJava Exercises - Basic to Advanced Java Practice Programs with Solutions5 min readJava Quiz1 min readJava Project Ideas For Beginners and Advanced15+ min read Like