Iterable
Root interface for collections which allows iterating them.
Traversing
It can be iterated:
Iterator<String> itr;
itr = strings.iterator();
while(itr.hasNext()) {
System.out.println(itr.next());
}
And it can be used in for-each loops:
for(String s : strings) {
System.out.println(s);
}
Last updated
Was this helpful?