This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
i am reading the K&b scjp 6 guide book, in this example:
after that i have read this section:
so obviously changing the hashcode-factor will affect the hashmap collection object (from the example above), now my question is
if the hashcode is changed, it is possible to get duplicated key, and what will happen since hashmap does not allow dulplicated key?
I have checked the hashmap API , the function 'put' will override/replace the duplicated value with the previous value. but how about the question taht i am asking? the collection has distinct key, but suddenly its hashcode has been changed. what happen to the collection?