Map迭代

for(Map.Entry<String, List> entry : map.entrySet()) {
System.out.println(entry.getKey());
List ls=entry.getValue();
}

Iterator it = map.keySet().iterator();
while(it.hasNext()){
String key = (String) it.next();
List value = map.get(key);
}

你可能感兴趣的:(Map迭代)