Hi,
I made a HashMap<String, Integer>. I want to iterator over all elements.
for (Iterator it = m_Table.values().iterator(
); it.hasNext();) {
Map.Entry entry = (Map.Entry)it.next();
String strKey = (String)entry.getKey()
Integer nData = (Integer)entry.getValue() ;
}
This causes a runtime exception though... what's the right way to do it?
Thanks
Start Free Trial