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 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]));
}

 

posted on 2013-10-12 09:57  小码农_ZXB  阅读(306)  评论(0编辑  收藏  举报