Add a cast.
temp = ((word)itr.next()).getWord();
You might get a warning that says this is a potentially unsafe cast, but since you know that the iterator can only return a word, you can...
Type: Posts; User: helloworld922
Add a cast.
temp = ((word)itr.next()).getWord();
You might get a warning that says this is a potentially unsafe cast, but since you know that the iterator can only return a word, you can...