while (
wordIterator.hasNext() ) {
word = (String)wordIterator.next();
definition = this.getEntry( word );
str += word +
":\n" +
definition.toString() +
"\n";
}
hasNext() returns false when at end of list
next() returns a reference to the next Object in the
list
cast that to a String since thats what the key
is