how to set value of key in java ahshmap code example Example: java hashmap set value myMap.put(key, value);