for (Entry<String, String> entry : map.entrySet()){ System.out.println(entry.getKey() + "/" + entry.getValue()); }
須要 import java.util.Map.Entry;java
Iterator entries = myMap.entrySet().iterator(); while (entries.hasNext()) { Entry thisEntry = (Entry) entries.next(); Object key = thisEntry.getKey(); Object value = thisEntry.getValue(); }