Map<String, String>map = new HashMap<String, String>()
map.put("1", "a")
map.put("222", "aa")
map.put("33", "aaa")
Set<String>set = new HashSet<String>()
set= map.keySet()
for (String key : set) {
//循环取出了你map里面的值然后再调用你的sql方法想怎么存就怎么存
System.out.print(key+" = "+map.get(key))
}
}
Set<Object>keySet = map.keySet()//获取map的key值的集合,set集合for(Object obj:keySet){//遍历key
System.out.println("key:"+obj+",Value:"+map.get(obj))//输出键与值
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)