Campbell Ritchie wrote:Welcome to JavaRanch.
There is nothing in the API about a maximum size, but I believe the actual size is always an exact power of 2. So your 170000 would actually be 524288. 2^18 is 262144, but 262144 * 0.6 < 170000, so it would double to 2^19 = 524288.
So your 170000 would actually be 524288. 2^18 is 262144, but 262144 * 0.6 < 170000, so it would double to 2^19 = 524288.
why did you multiply by 0.6?
Given that it is backed by an Array with max size 2^31-1, or 2^30 when limited to powers of two. 2^19 still leaves plenty of room.
i am not getting the calculations.