Resize () method of HashMap Source Code in jdk1.8

clipboard.png

the red box in the picture shows that the code does not understand;
if the capacity of the original hashMap is 16 and the subscript is 15 (jacks 15), three data with a hash value of 15, 31, 47 and 47 are stored. After the expansion, the hashMap capacity is 32, and according to the code hiHead, it is 31mai 47, which is stored in the location of subscript 31 (jacks 16). But shouldn"t the position calculated by 4731 be 15?

Mar.10,2021

471160. it is not stored in hiHead, but in loHead, 473115. the storage location has not changed. The problem is caused by a miscalculation, and it is now clear

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44679-43e08.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44679-43e08.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?