所以我认为有它的一些值的地图被传递给方法:投入一个地图<String, ?>
public String doThis(Map<String, ?> context){
.....
}
而且我想插入除了属性这个地图
String abc="123";
context.put("newAttr",abc);
但我收到此错误:
The method put(String, capture#8-of ?) in the type Map is not applicable for the arguments (String, String)
反正是有执行该认沽没有“克隆”的地图?
您是否试图创建一个可以存储任何类型对象的地图? – Perception 2012-01-11 20:21:14