下面是HASHTABLE的PUT方法JDK API:
put
public Object put(Object key,
Object value)Maps the specified key to the specified value in this hashtable. Neither the key nor the value can be null.
The value can be retrieved by calling the get method with a key that is equal to the original key.
Specified by:
put in interface Map
Specified by:
put in class Dictionary
Parameters:
key - the hashtable key.
value - the value.
Returns:
the previous value of the specified key in this hashtable, or null if it did not have one.
Throws:
NullPointerException - if the key or value is null.
See Also:
Object.equals(Object), get(Object)