hashmap in java uses Separate chaining to handle Collision and that is why you can insert any number of time without any problem.
what i do not understand : The reason why hashmap ( in Java ) is needed to be rehashed
Is that just an optimization of the classical Separate chaining to limit the number of keys that each bucket can have ( because these keys have the same hash ) ?