Agree. I once managed to crash an ArrayList by adding 64000000 Strings to it, and I crashed an int[] by trying to declare it with size 2147483647.James Daniel wrote:Memory is always a concern.
. . .
William Brogden wrote:Note that making a good guess on the initial capacity will help performance with collections.
Campbell Ritchie wrote:Yes, I should have guessed 9000000 for my Sets. A guess too high, however, would have taken me over my available memory even before the Set was filled.
Honk if you love justice! And honk twice for tiny ads!
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
|