public static void main(String[] args) {
Map<String, String> map = new HashMap<String, String>();
map.put("姓名", "值");
map.put("性别","男");
Iterator<Entry<String, String>> it = map.entrySet().iterator();
while (it.hasNext()) {
Entry<String, String> entry = it.next();
System.out.println(entry.getKey() + "=" + entry.getValue());
}
}
Map集合输出元素
最新推荐文章于 2022-10-24 16:18:37 发布
1243

被折叠的 条评论
为什么被折叠?



