本帖最后由 haohanlinyu 于 2014-6-17 21:46 编辑
HashMap<String,Integer> Maps=new HashMap<String,Integer>();
maps.put("zxx",28);
Set <Map.Entry<String,Integer>> entrySet=maps.entrySet();
for(Map.Entry<String,Integer>entry:entrySet)
{
System.out.println(entry.getKey()+":"+entry.getValue())
} |
|