Hi, when i call this method from another class, all im getting is null (value of NONE_LEFT) but i have tested the wordCollection hashset with a for each and it does contain Strings, plenty of them!
Any one see why without having to see any more of my code?
just for good measure...
Code:
public String getNextWord()
{
if(iter.hasNext())
{
return iter.next();
}
else
{
return NONE_LEFT;
}
}
just for good measure...
Code:
private HashSet<String> wordCollection = new HashSet<String>();
private Iterator<String> iter = wordCollection.iterator();
Comment