bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Iterator Interface

Iterator Methods

The Iterator interface provides methods to access and iterate through collections:

MethodDescriptionReturn Type
hasNext()Returns true if there are more elements in the iterationboolean
remove()Removes the last element returned by next()void

Note

The next() method uses the type of the iterator's items as its return value. This type is referred to as T in the table.

Previous

Java BufferedWriter Methods

Next

Java Collections Class Methods