Set
public class MapTest {
public static void main(String[] args) {
Map m = new HashMap();
m.put("name", "LQX");
m.put("age", 23);
m.put("sex", true);
Object s[] = m.keySet().toArray();
for(int i = 0; i < m.size(); i++) {
System.out.println(m.get(s[i]));
}
}
for(Map.Entry
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);
}
使用Iterator 你看你的回答里面 zhoulianglg的回答很不错!我也是这么想的!