HashMap is one of the most widely used implementation of Map to store key-value pairs. It has been introduced in Java 1.2 and here I am trying to implement HashMap with ArrayList. The below code will provide two of the basic HashMap functions i.e get(key) and put(key, value). The code also takes care of checking duplicate values while storing.
Please note that its just the basic implementation and should not be used as a replacement of HashMap. Also while testing the code, make sure that the Object used in the KEY has proper implementation of equals() method.