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

Iterator iterator()

Returns an Iterator object that can be used to iterate the object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset