Package java.lang

Interface Iterable<T>

  • All Known Subinterfaces:
    Collection<E>, List<E>, Queue<E>
    All Known Implementing Classes:
    ArrayList

    public interface Iterable<T>
    Instances of classes that implement this interface can be used with the enhanced for loop.
    Since:
    1.5
    • Method Detail

      • iterator

        Iterator<T> iterator()
        Returns an Iterator for the elements in this object.
        Returns:
        An Iterator instance.