Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
Java
9.3K+ articles
Misc
7.8K+ 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-Enumeration
17+ articles
Java-Iterable
1+ articles
Java-Iterator
11 posts
Recent Articles
Popular Articles
Java Iterator
Last Updated: 20 December 2024
An Iterator in Java is an interface used to traverse elements in a Collection sequentially. It provides methods like hasNext(), next(), and remove() to loop through collec...
read more
Misc
Java
Java-Collections
Java-Iterator
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
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
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
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
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
Enumeration vs Iterator vs ListIterator in Java
Last Updated: 02 September 2020
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
Iterator Interface In Java
Last Updated: 09 November 2020
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
ListIterator in Java
Last Updated: 01 November 2022
ListIterator is one of the four java cursors. It is a java iterator that is used to traverse all types of lists including ArrayList, Vector, LinkedList, Stack, etc. It is ...
read more
Java
Java-Iterator
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: 07 January 2021
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
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !