hashMap 屬性說明

2021-07-10 17:56:20 字數 1442 閱讀 9369

public class hashmapextends abstractmapimplements map, cloneable, serializable

{ /**

* the default initial capacity - must be a power of two.

*/static final int default_initial_capacity = 16;//預設初始容量(陣列大小)

/*** the maximum capacity, used if a higher value is implicitly specified

* by either of the constructors with arguments.

* must be a power of two <= 1<<30.

*/static final int maximum_capacity = 1 << 30;//1073741824最大的容量範圍

/*** the load factor used when none specified in constructor.

*/static final float default_load_factor = 0.75f;//載入因子預設0.75

/*** the table, resized as necessary. length must always be a power of two.

*/transient entry table;//儲存資料的entry陣列

/***/

transient int size;//陣列的大小

/*** the next size value at which to resize (capacity * load factor).

* @serial

*/int threshold;//臨界值=載入因子*初始容量(當size大於臨界值就會出現陣列擴充到原來2 倍)

/*** the load factor for the hash table.

** @serial

*/final float loadfactor;//載入因子預設0.75

/*** the number of times this hashmap has been structurally modified

* the hashmap or otherwise modify its internal structure (e.g.,

* rehash). this field is used to make iterators on collection-views of

* the hashmap fail-fast. (see concurrentmodificationexception).

*/transient volatile int modcount;//修改的次數

hashMap 屬性說明

public class hashmapextends abstractmapimplements map,cloneable,serializable the default initial capacity must be a power of two.static final int defa...

HTML meta viewport屬性說明

手機瀏覽器是把頁面放在乙個虛擬的 視窗 viewport 中,通常這個虛擬的 視窗 viewport 比螢幕寬,這樣就不用把每個網頁擠到很小的視窗中 這樣會破壞沒有針對手機瀏覽器優化的網頁的布局 使用者可以通過平移和縮放來看網頁的不同部分。移動版的 safari 瀏覽器最新引進了 viewport ...

CascadeType屬性說明

cascadetype.persist只有a類新增時,會級聯b物件新增。若b物件在資料庫存 跟新 在則拋異常 讓b變為持久態 cascadetype.merge指a類新增或者變化,會級聯b物件 新增或者變化 cascadetype.remove只有a類刪除時,會級聯刪除b類 cascadetype....