if (table == EMPTY_TABLE) {
inflateTable(threshold);
}

table

transient Entry<K,V>[] table = (Entry<K,V>[]) EMPTY_TABLE;
EMPTY_TABLE
static final Entry<?,?>[] EMPTY_TABLE = {};

hashMap put方法 第二行代码-LMLPHP

还是第二行代码

hashMap put方法 第二行代码-LMLPHP

有两个小问题:

1、static final transient 这几个关键字的意思

2、transient Entry<K,V>[] table = (Entry<K,V>[]) EMPTY_TABLE; 这句话的意思

04-27 16:49