HashMap的底层原理分析
转自:https://zhuanlan.zhihu.com/p/79507868,稍作修改
HashMap是一个集合,键值对的集合,源码中每个节点用Node<K,V>表示
static class Node<K,V> implements Map.Entry<K,V> {
final int hash;
final K key;
V value;
Node<K,V> next;
// ...
Node是一个内部类,这里的key为
转载
2020-10-16 10:32:58 ·
289 阅读 ·
0 评论