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方法 第二行代码

还是第二行代码

hashMap put方法 第二行代码

 有两个小问题: 

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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2021-12-11
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2021-06-05
  • 2021-09-29
  • 2021-10-14
  • 2021-12-17
  • 2022-12-23
  • 2021-04-10
相关资源
相似解决方案