//list中的数据可以用iterate获取,也可以循环,但是map values中的只能用iterate collection
Map map = new HashMap<Integer, String>();
map.put(1, "frist");
map.put(2, "second");
Collection con = map.values();
Iterator ite = con.iterator();
while(ite.hasNext()) {
System.out.println(ite.next());
}
list map中的value获取
猜你喜欢
转载自yuhuiblog6338999322098842.iteye.com/blog/2169740
今日推荐
周排行