Collaborative project by Emmanuel, Janja, Svilen
The codes submitted to Github demonstrate multiple functionalites of the HashMap collection.
A good amount of Hashmap methods were used in our code. Usually in combination with foreach loops.
- put() - This method simply adds an item to the HashMap
- putIfAbsent() - This method allows you to map a value to a key provided the given key isn't already associated with a value.
- replace() - This method replaces the specified value for a specified key.
- remove() - This method removes specified values with the associated specified keys from the map.
- putAll() - This method is used to insert the specified map in the map.
- clear() - This method clears the given mappings to the map
- isEmpty() - This method checks if the HashMap is empty and return true if it is.
- size() - This method returns the size of the Hashmap.
Amongst various other methods.