Next:
Access HashMap Elements
Up:
Methods of HashMap
Previous:
Methods of HashMap
Contents
Insert Elements to HashMap
put()
- inserts the specified key/value mapping to the map.
putAll()
- inserts all the entries from specified map to this map
putIfAbsent()
- inserts the specified key/value mapping to the map if the specified key is not present in the map
Output