Category Java

How to Iterate ArrayList in Java

How to iterate ArrayList in Java

In this tutorial, we will learn how to iterate ArrayList in Java. Basically, there are six ways by which we can iterate over elements of an ArrayList. In other words, Java collections framework provides six ways to retrieve elements from…

ListIterator in Java | Methods, Example

Internal working of ListIterator in Java

ListIterator in Java is the most powerful iterator or cursor that was introduced in Java 1.2 version. It is a bi-directional cursor. ListIterator is an interface (an extension of Iterator interface) in Java that is used to retrieve elements from…

Iterator in Java

Basci working mechanism of Java Iterator

An iterator in Java is a special type of object that provides sequential (one by one) access to the elements of a collection object. In simple words, it is an object that allows us to get and process one element…

Enumeration in Java

Java Iterators: Enumeration in Java

In this tutorial, we will discuss enumeration in Java with the help of examples. We will also understand the different types of iterators in Java. Before moving to understand enumeration, let’s first understand how many types of iterators are available…

ArrayList in Java

ArrayList Constructor in Java

ArrayList in Java is a dynamic array that allows us to store multiple objects of any class or data type. It is similar to an array, but there is no fixed size limit. It was added to the Java programming…