Prodigal son Tang Shao 2022-02-13 07:29:13 阅读数:458
hashMap Of jdk7 and jdk8 There's a difference ;
1. Realization way
jdk7 Using arrays + Linked list ,jdk8 The array used + Linked list + Red and black trees
2. When a new node is inserted into the linked list, the insertion order is different
jdk7 Insert in the head ( It is easy to cause the problem of dead loop when multithreading capacity expansion ),jdk8 Insert at the end
Common characteristics :
copyright:author[Prodigal son Tang Shao],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130729117178.html