In my JDK 1.4 world, I had a very common way of iterating through lists and maps.  Switching to JDK 1.7 had me learning so many new ways of doing things in so many areas.  One of them was iterating over HashMaps, so here is how I do it now:

Iterator it = mp.entrySet().iterator();
while(it.hasNext()) {
Map.Entry pairs =(Map.Entry)it.next();
System.out.println(pairs.getKey()+" = "+ pairs.getValue());
it.remove();// avoids Exception
}