遍历 map 的方法

LinkedHashMap<String, String> map = questionContent.getChoiceList();        //拿到一个map<String,String>
for (String key : map.keySet()) { 遍历,替换图片路径
String s = map.get(key);
String[] strarray=s.split(url);
map.replace(key,strarray[1]);
}

这里就是通过map的key 去遍历 map的。其实相当于 for(String s :list )
下班记得打卡
原文地址:https://www.cnblogs.com/onlyzhangmeng/p/15344008.html