I made a HashMap<String, Integer>. I want to iterator over all elements.
This causes a runtime exception though... what's the right way to do it?
You made iterator on values Iterator it = m_Table.values().iterator(); so the objects you get from this iterator you can cast to the value type Integer.
But then you try to cast the object returned by iterator to Map.Entry class, getting ClassCastException