代码如下:
Map<String, Object> hashMap = new HashMap<String, Object>();
hashMap.put("ids", request.getParameterValues("ids"));
跪求
怎么获得id的值呀?
------解决方案--------------------
String[] strs=(String[])hashMap.get("ids");
------解决方案--------------------
楼主是这个意思吗?
Map<String,Object> map=new HashMap<String, Object>();
Object[] obj={1,"a","b","c"};
map.put("ids",obj );
Object[] obj1=(Object[]) map.get("ids");
for (int i = 0; i < obj1.length; i++) {
System.out.println(obj1[i]);
}