标签:des style http color io os java ar strong
put函数返回值是键值对后面的那个value值
今天写程序看到
statue=hashmap.put(x,y);
我一开始以为返回值是1或者0
后来仔细看一下api文档原来不是如此。。
不知道设计者的意图是什么???
public V put(K key, V value)
put
in
interface Map<K,V>
put
in
class AbstractMap<K,V>
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified key
标签:des style http color io os java ar strong
原文地址:http://blog.csdn.net/songjunyan/article/details/39552239