摘要: HashMap有扩容机制,就是当达到扩容条件时会进行扩容。HashMap的扩容条件就是当HashMap中的元素个数(size)超过临界值(threshold)时就会自动扩容。在HashMap中,threshold = loadFactor * capacity。 每次扩容会重建hash表,导致性能下 阅读全文
posted @ 2020-04-02 00:03 konami 阅读(325) 评论(0) 推荐(0) 编辑