Introducing the forEachRemaining() in Iterator.

This lesson explains the forEachRemaining() method, which was introduced in the iterator class in Java 8.

We'll cover the following

forEachRemaining() in Iterator

Iterator is an interface available in the Collections framework in java.util package. It is used to iterate a collection of objects. This interface has four methods, as shown in the below image. Before, Java 8 the forEachRemaining() method did not exist.

Get hands-on with 1200+ tech skills courses.