Java Language Iterator and Iterable

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

The java.util.Iterator is the standard Java SE interface for object that implement the Iterator design pattern. The java.lang.Iterable interface is for objects that can provide an iterator.

Remarks

It is possible to iterate over an array using the for-each loop, though java arrays do not implement Iterable; iterating is done by JVM using a non-accessible index in the background.



Got any Java Language Question?