help!, while loop wont stop!
hello, i'm trying to iterate hashmap with while loop, when i send the hashmap to system.out, it gives me the object, when i look at its size, it says 1013.
so the hashmap is fine i think.
here's the code
Code:
int i = 0;
Iterator hashIterator = hMap.keySet().iterator();
while(hashIterator.hasNext()){
i++
}
is the while loop right?, because in system out, the i++ never stops.
and like i said before if i try system.out on the hMap.keySet, it gives me all my key set.
any idea??