【发布时间】:2013-08-10 12:32:09
【问题描述】:
我有这样的地图设置:
Map<Integer, Set<Long>> myMap = new HashMap<Integer, Set<Long>>();
我正在尝试将我的第一个值添加到 myMap,如下所示:
myMap.put(1, myMap.get(1).add(myLong));
java 会返回这个:
The method put(Integer, Set<Long>) in the type Map<Integer, Set<Long>> is not applicable for the arguments (int, boolean)
【问题讨论】: