我需要先将对象返回,然后再放入一个新对象吗?还是可以直接递增呢?
Integer temp = myMap.get(key); temp++; myMap.put(key, temp);
没有办法仅仅这样做(这种方式不起作用):
myMap.get(key)++;
用户名或邮箱地址
密码