Yeah you can use index in List as an Key in hashmap. But if they give any object, so we have to store that one also.
Here i got an idea
, when ever you are writting your own put method, you have to use two array lists, in which one takes key and another takes value objects. So, the index of the one key and value pair will be the same. In get method , you will get a key, by taking that keys list and by iterating you can get the index of that key and by using the same index you can get the object from the another list(because the indexes of the key and value are same). So you can return that value from your get method.
But instead of this logic there is something, means using one or two method we can implement the Hasmap by using the list.
That i want,
if any body knows please let me know
Thanks and regards
Ratna sekhar