I have a small doubt with the concept of Rehashing in HashMap
.
Lets say I have a HashMap
with size 8 and within that I have an Object(E1) present at index 7. So when we put multiple elements, forcing the HashMap to increase its internal Array size, which will lead to rehashing.
So my question goes, After the rehashing, will my Object(E1) be placed at 7th index or will it get a different bucket.
Appreciate useful response and references.