A. 關於java 循環創建 Map<String, Object>的問題
Map<String,Map<String,Object>>map=newHashMap<String,Map<String,Object>>();
for(inti=0;i<3;i++){
Map<String,Object>mapchild=newHashMap<String,Object>();
mapchild.put("url",1);
mapchild.put("car_where",2);
mapchild.put("car_String",3);
mapchild.put("car_number",4);
map.put("map"+i,mapchild);
}
for(inti=0;i<map.size();i++){
//這裡面data.add(map.get("map"+i));
System.out.println(map.get("map"+i).get("url"));
}