Does retrieval time varies for hashmap or hashset varies based on the size?
to be more clear, if there are 1000 objects in hashmap1 and 2000 objects in hashmap2, retrieving an object from which hashmap will be faster and why?
Have you tried researching this at all? Have you done any work other than asking here? If so, what have you found?
We don't like to just hand out answers to homework problems (or any other problem). Do a little research, and them come back and tell us what you found, and ask about what doesn't make sense.
Never ascribe to malice that which can be adequately explained by stupidity.