遍历listmap 遍历map

package excel;  

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map; public class List1
{
public static void main(String[] args)
{ Map map = new HashMap<String, Object>();
map.put("1", "fds");
map.put("2", "valu");
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
list.add(map);
for (Map<String, Object> m : list)
{
for (String k : m.keySet())
{
System.out.println(k + " : " + m.get(k));
} } }
} map的for循环中for(Map.Entry<String, Object> entry : paraMap.entrySet())

  

上一篇:用反射的形式将一个对象属性值赋值给另一个对象,省略点get/set方法的冗余代码


下一篇:OSRM笔记