HashMap面试常见的六连问,你可以扛得住吗?
高手过招,招招致命 JDK1.8 中 HashMap 的底层实现,我相信大家都能说上来个 一二,底层数据结构 数组 + 链表(或红黑树) ,源码如下: /** * 数组 */ transient NodeK,V[] table; /** * 链表结构 */ static class NodeK,V implements Map.EntryK,V { fin
高手过招,招招致命 JDK1.8 中 HashMap 的底层实现,我相信大家都能说上来个 一二,底层数据结构 数组 + 链表(或红黑树) ,源码如下: /** * 数组 */ transient NodeK,V[] table; /** * 链表结构 */ static class NodeK,V implements Map.EntryK,V { fin