java中的數量級

Integer家族

Integer.MaxValue = 2^(31)  - 1 

Integer.MinValue = -2^(31) 

Integer.MaxValue  + 1 = Integer.MinValue  (值相等)

HashMap,java1.8

MAX_CAPACITY = 2^(30) 即是Node數組長度
hash方法取的高位參與hash, 爲2^(16)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章