Well I understand most of working of hashmap, placing of key-value pairs according to hashcode. I was reading this question https://stackoverflow.com/questions/10901752/what-is-the-significance-of-load-factor-in-hashmap#=
Here one of the comment and accepted answer says The probability of the hash collision is less, if the size of the map is bigger. For example elements with hash codes 4, 8, 16 and 32 will be placed in the same bucket, if the size of the map is 4, but every item will get an own bucket, if the size of the map is more than 32. The map with initial size 4 and load factor 1.0 (4 buckets, but all the 4 element in a single bucket) will be in this example in average two times slower than another one with the load factor 0.75 (8 buckets, two buckets filled - with element "4" and with elements "8", "16", "32")..
So according to it different hashcodes can be assigned to same bucket, Is it correct??
Q1. Can somebody explain this in more detail?
Q2. I am not able to understand how initial size of hashmap impacts this?
I dont think It's duplicate, Nowhere I found the clear answer to my questions above. But the first comment explains it. Adding that as answer.