Which of the below is not an implementation of a Map interface?
Map : is a data structure which can be used to store key-value pairs.
eg1: states, capitals.
eg2: questions, and answers
Properties of Maps:
1. Map will not allow duplicate keys. Keys should be unique.
2. Each key can map to at most one value.
There are 3 specific implementation of Map interface.
HashMap is the fastest of all three implementations, as it doesn't store data in particular order.
TreeMap stores data in ascending order. LinkedHashMap stores data in insertion order. So they are less efficient compared to HashMap.
Back To Top