hashMap put方法 第二行代码

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

 

table

transient Entry<K,V>[] table = (Entry<K,V>[]) EMPTY_TABLE;

EMPTY_TABLE
static final Entry<?,?>[] EMPTY_TABLE = {};

 

还是第二行代码

 有两个小问题: 

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

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

 

posted @ 2018-09-28 11:58  fleam  阅读(115)  评论(0编辑  收藏  举报