---
title: "What is a list iterator in java?"  
description: "What is a list iterator in java?"  
author: "Sumit Kesarwani"  
published: 2014-03-26  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/1937/what-is-a-list-iterator-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is a list iterator in java?

The List and Set collections provide iterators, which are objects that allow going over all the elements of a collection in sequence. The java.util.Iterator interface provides for one-way traversal and java.util.ListIterator is an iterator for lists that allows the programmer to traverse the list in either direction (i.e. forward and or backward) and modify the list during iteration.

## Answers

### Answer by Dagmara Aburto

The ListIterator in JAVA or in another lenguage, is an iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator’s current position in the list.

### Answer by Sumit Kesarwani

The List and Set collections provide iterators, which are objects that allow going over all the elements of a collection in sequence. The java.util.Iterator interface provides for one-way traversal and java.util.ListIterator is an iterator for lists that allows the programmer to traverse the list in either direction (i.e. forward and or backward) and modify the list during iteration.


---

Original Source: https://www.mindstick.com/interview/1937/what-is-a-list-iterator-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
