Is there a limit to HashMap in Java?

HashMap is not limited , provided to have a load factor is increased. … And the largest number of elements you can have before the HashMap will try to double its size to 2^31 (which it cannot do) is ( 2^30 * loadFactor ) or about 700 million for the default load factor.

Sizin İçin Seçtik  What is case-insensitive in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *