Working on put() function in hashmap.