java_集合学习(一)

Java
HashMap
⼀、概述
在官⽅⽂档中是这样描述HashMap的:
Hash table based implementation of the Map interface. This implementation provides
all of the optional map operations, and permits null values and the null key. (The
HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized
and permits nulls.) This class makes no guarantees as to the order of the map; in
particular, it does not guarantee that the order will remain constant over time.
⼏个关键的信息:基于Map接⼝实现、允许null键/值、⾮同步、不保证有序(⽐如插⼊的顺序)、
也不保证序不随时间变化。
在HashMap中有两个很重要的参数,容量(Capacity)和负载因⼦(Load factor)
Initial capacity: The capacity is the number of buckets in the hash table, The initial
capacity is simply the capacity at the time the hash table is created.
Load factor: The load factor is a measure

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章