Data Structure
Java
Python
HTML
Interview Preparation
Interview Prep
Tutorials
Tracks
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Java
9.3K+ articles
Misc
7.7K+ articles
Java - util package
1.6K+ articles
Java-Collections
1.1K+ articles
Java-HashMap
159+ articles
java-stream
142+ articles
Java-Stream-programs
27+ articles
Java-Collectors
19+ articles
Java-Iterable
1+ articles
Java-Iterator
15 posts
Recent Articles
Popular Articles
Previous() Method in Java Collections
Last Updated: 28 October 2025
The previous() method in Java is a part of the ListIterator interface, which allows bidirectional traversal of elements in a list. It moves the cursor one step backward in...
read more
Java
Java-Collections
Java-Iterator
hasPrevious() Method in Java Collections
Last Updated: 28 October 2025
The hasPrevious() method is provided by the ListIterator interface in Java. It is used to check whether there is a previous element while traversing a list in the reverse ...
read more
Java
Java-Collections
Java-Iterator
hasNext() Method in Java Collections
Last Updated: 28 October 2025
The hasNext() method is provided by both the Iterator and ListIterator interfaces in Java. It is used to check whether the iteration has more elements before calling the n...
read more
Java
Java-Collections
Java-Iterator
next() Method in Java Collections
Last Updated: 28 October 2025
The Iterator and ListIterator interfaces provide the next method. It is used to retrieve the next element in a collection while traversing through it. It returns the next ...
read more
Java
Java-Iterator
Java-Collectors
Replace an Element From ArrayList using Java ListIterator
Last Updated: 03 April 2023
To replace an element from an ArrayList, the set() method of ListIterator interface can be used. set() method of ListIterator replaces the last element which is returned b...
read more
Java
Java Programs
Picked
Java-Collections
Java-ArrayList
Java-Iterator
How to Remove an Element from Collection using Iterator Object in Java?
Last Updated: 23 July 2025
Collection in Java is a set of interfaces like List, Set, and Queue. An iterator in Java is used to iterate or traverse through the elements of the Collection. There are t...
read more
Java
Technical Scripter
Java Programs
Picked
Technical Scripter 2020
Java-Collections
Java-Iterator
ListIterator in Java
Last Updated: 19 November 2025
ListIterator is a type of Java cursor used to traverse all types of lists, such as ArrayList, LinkedList, Vector, and Stack. It was introduced in Java 1.2 and extends the...
read more
Java
Java-Iterator
Iterator Interface In Java
Last Updated: 23 July 2025
Java Iterator Interface of java collections allows us to access elements of the collection and is used to iterate over the elements in the collection(Map, List or Set). It...
read more
Java
Java-Iterator
Enumeration vs Iterator vs ListIterator in Java
Last Updated: 15 July 2025
Enumeration is an interface. It is used in the collection framework in java to retrieve the elements one by one. Enumeration is a legacy interface that is applicable only ...
read more
Java
Computer Subject
Difference Between
Java-Iterator
Java-Enumeration
How to iterate over a 2D list (list of lists) in Java
Last Updated: 12 July 2025
Given a 2D list, the task is to iterate this 2D list in Java.2D list (list of lists)The 2D list refers to a list of lists, i.e. each row of the list is another list.[ [5,...
read more
Java
java-list
Traversal
Java-Iterator
Difference between an Iterator and ListIterator in Java
Last Updated: 11 July 2025
Iterators are used in Collection framework in Java to retrieve elements one by one. It can be applied to any Collection object. By using Iterator, we can perform both read...
read more
Java
Difference Between
Java Programs
Picked
Java-Iterator
PriorityBlockingQueue iterator() method in Java
Last Updated: 11 July 2025
The iterator() method of PriorityBlockingQueue class Returns an iterator over the elements in this queue. The elements returned from this method do not follow any order. ...
read more
Misc
Java
Java-Collections
Java - util package
Java-Functions
Java-Iterator
Java-PriorityBlockingQueue
Creating Sequential Stream from an Iterator in Java
Last Updated: 11 July 2025
Iterators, in Java, are used in Collection Framework to retrieve elements one by one.A stream in Java is a pipeline of objects from an array or a collection data source. A...
read more
Java
Java - util package
java-stream
Java-Iterable
Java-Iterator
Java-Stream-programs
Fail Fast and Fail Safe Iterators in Java
Last Updated: 02 September 2024
In this article, I am going to explain how those collections behave which doesn't iterate as fail-fast. First of all, there is no term as fail-safe given in many places as...
read more
Java
Java-HashMap
Java-Iterator
Iterator in Java
Last Updated: 22 November 2025
An Iterator in Java is one of the most commonly used cursors in the Java Collections Framework. It is used to traverse or iterate through elements of a collection one by o...
read more
Misc
Java
Java-Collections
Java-Iterator