for(Map.Entry<String,Integer> res:map.entrySet()){
String a=res.getKey();//获取当前map的键
int b=res.getValue();//获取当前map的值
}
如何输出全部map的键值对
最新推荐文章于 2023-11-24 18:49:02 发布
for(Map.Entry<String,Integer> res:map.entrySet()){
String a=res.getKey();//获取当前map的键
int b=res.getValue();//获取当前map的值
}