HashMap<String, String> map=new HashMap<String, String>
List<String> keys = new ArrayList<>(map.keySet());
for (int i = 0; i < keys.size(); i++) {
String key = keys.get(i);
String value = map.get(key);
post.params(key, value);
Log.e("tagtag",key+"||"+value);
}
for (String s : listResidualPath.keySet()) {
SystemBean systemBean = listResidualPath.get(s);
savePathInfo(systemBean.group, systemBean.title, systemBean.descrip, systemBean.packageName, systemBean.path);
}
list.keyset.for既可调出for循环
//hashmap中是否包含key、value
data.containsKey(data)
data.containsValue(data)
Android 打印HashMap map的键和值 hashmap的遍历
于 2019-12-25 09:58:08 首次发布