Iterator and Iterable

Download java eBook

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.

Related Examples

Stats

224 Contributors: 9
Thursday, March 23, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook