8.20.4.Object put(Object key, Object value) Associates key and value.
import java.util.HashMap; import java.util.Map;
public class MainClass { public static void main(String[] argv) {
Map map = new HashMap();
map.put("key", "value");
// the older value is removed and returned
map.put("key", "value new");
System.out.println(map);
}
}