## Uses of Interface
java.util.Iterator

- Packages that use Iterator
  Package | Description
  --- | ---
  java.lang |
  java.util |

- - ### Uses of Iterator in java.lang

    Methods in java.lang that return Iterator
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<T>` | Iterable.`iterator()` Returns an iterator over elements of type `T`.

  - ### Uses of Iterator in java.util

    Subinterfaces of Iterator in java.util
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `ListIterator<E>` An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list.

    Methods in java.util that return Iterator
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<E>` | Set.`iterator()` Returns an iterator over the elements in this set.
    `Iterator<S>` | ServiceLoader.`iterator()` Lazily loads the available providers of this loader's service.
    `Iterator<E>` | List.`iterator()` Returns an iterator over the elements in this list in proper sequence.
    `Iterator<E>` | Collection.`iterator()` Returns an iterator over the elements in this collection.

Copyright © 2025 API Design. All Rights Reserved.