You can also use a special for loop syntax that automatically handles iterators.


for (word w : words) {
System.out.println(w.getWord());
}