@@ -0,0 +1,1678 @@
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class MyHashMap%3CObjectK, ObjectV%3E %7B%0A    class Container %7B%0A        ObjectK key;%0A        ObjectV value;%0A        public void insert (ObjectK k, ObjectV v) %7B%0A            this.key = k;%0A            this.value = v;%0A        %7D%0A    %7D%0A%0A    private Container c;%0A    private List%3CContainer%3E recordList;%0A%0A    public MyHashMap() %7B%0A        this.recordList = new ArrayList%3CContainer%3E();%0A    %7D%0A%0A    public void put(ObjectK k, ObjectV v) %7B%0A        this.c = new Container();%0A        c.insert(k, v);%0A        // check for the same key before adding%0A        for (int i = 0; i %3C recordList.size(); i++) %7B%0A            Container c1 = recordList.get(i);%0A            if (c1.key.equals(k)) %7B%0A                // remove the existing Object%0A                recordList.remove(i);%0A                break;%0A            %7D%0A        %7D%0A        recordList.add(c);%0A    %7D%0A%0A    public ObjectV get (ObjectK k) %7B%0A        for (int i = 0; i %3C this.recordList.size(); i++) %7B%0A            Container con = recordList.get(i);%0A            // System.out.println(%22k.toString(): %22 + k.toString() + %22con.key.toString()%22 + con.key.toString());%0A            if (k.toString() == con.key.toString()) %7B%0A                return con.value;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    public static void main (String args%5B%5D ) %7B%0A        MyHashMap%3CString, String%3E hm = new MyHashMap%3CString, String%3E();%0A        hm.put(%221%22, %221%22);%0A        hm.put(%222%22, %222%22);%0A        hm.put(%223%22, %223%22);%0A        System.out.println(hm.get(%223%22));%0A        hm.put(%223%22, %224%22);%0A%0A        System.out.println(hm.get(%221%22));%0A        System.out.println(hm.get(%223%22));%0A        System.out.println(hm.get(%228%22));%0A    %7D%0A%7D%0A

add MyHashMap.java