public class
ArrayIterable<T> implements Iterable<T> { private final T[] objetos;
public ArrayIterable(T[] objetos) { this.objetos = objetos; }
public Iterator<T> iterator()
{ IteraArray<T> iterator =
new IteraArray<T>(objetos); return iterator; }
}
public static void main(String[] args) { String[] datos =
{"a", "b", "c"}; Iterable<String> it = new
ArrayIterable<String>(datos); for (String s : it) System.out.println(s); }