API description of Map's method entrySet:
Returns a Set view of the mappings contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation, or through the setValue operation on a map entry returned by the iterator) the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
a set view of the mappings contained in this map
So, in your case:
1. Map mymap = new ...;
2. Set myset = mymap.entrySet() ;
3. Iterator it = myset.iterator();
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad: