HashMap underlying data structure of FIG.

Entry is a HashMap backbone array. Entry HashMap is the basic unit, each Entry contains a key-value pairs.

JDK1.7 the data structure is an array of HashMap + linked list, JDK1.8 the data structure is an array of HashMap + + red-black tree list, the list JDK1.8 HashMap length of more than 8 can be converted into red-black tree.

HashMap data structure is as follows:

 

Guess you like

Origin www.cnblogs.com/gaopengpy/p/11923295.html