Iterable Interface
Package: java.util
The Iterable
interface must be implemented by any class that can be used by Java’s enhanced for
statement (commonly called “foreach”).
This interface defines a single method named iterator
, which returns an object that implements the Iterator
interface. For more information, see Iterator Interface.
Method
Method |
Explanation |
|
Returns an |
Get Java For Dummies Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.