Does a HashMap collision cause a resize?
问题 When there is a collision during a put in a HashMap is the map resized or is the entry added to a list in that particular bucket? 回答1: When you say 'collision', do you mean the same hashcode? The hashcode is used to determine what bucket in a HashMap is to be used, and the bucket is made up of a linked list of all the entries with the same hashcode. The entries are then compared for equality (using .equals()) before being returned or booted (get/put). Note that this is the HashMap