Source code analysis of HashMap and concurrent HashMap in Java 7 / 8

Java7 HashMap HashMap is the simplest. First, we are very familiar with it. Second, it does not support concurrent operations, so the source code is also very simple. First, let's use the following figure to introduce the structure of HashMap. This is only a schematic diagram, because it does not take into account the expansion of the ar ...

Posted by gingerboy101 on Wed, 06 Oct 2021 22:16:03 +0200

The difference between HashMap in JDK1.8 and JDK1.7 (detailed)

The difference between HashMap in JDK1.8 and JDK1.7 conclusion First of all, the biggest difference between HashMap in 1.7 and 1.8 is the change of underlying data structure. The underlying data structure used by HashMap in 1.7 is the form of array + Chain table, whereas in 1.8 HashMap uses the data structure of array + Chain Table + red-blac ...

Posted by adamhhh on Mon, 20 Sep 2021 14:07:14 +0200