A few important points to note about Map are:
- It's a data structure that maps keys to values.
- All keys in a Map should be unique. Using duplicate keys for any operation will lead to that operation being implemented on the earlier existing key.
- A key can be mapped to one value. The value can be an object or list of objects.
- Whether we should allow null as a key or not isn't firmly specified. Depending upon our requirements, we can implement a Map that either allows null as a key, or doesn't.
- Since Map doesn't deal with indexes, maintaining the order of the entries isn't guaranteed.
- The objects used as keys in any Map should ideally implement the equals and the hashCode methods. All operations on Map can be done using these methods.
- As keys are used for all operations in Map, we need to be very careful in choosing mutable data types as keys...