bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Iterator Interface

Flash cards

Review the key moves

1/3
Core idea

What is the main idea behind Java Iterator Interface?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

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