Hi all, does anyone know what’s the default max si...
# getting-started
j
Hi all, does anyone know what’s the default max size of a MutableList?
s
Default size is obviously zero, or however many items you put in it — but default capacity is most often 10 (e.g. https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html#ArrayList--) It shouldn’t normally be important, though…
j
sorry I meant max capacity
s
The max size is somewhat badly defined but is constrained by the max size of the underlying array, which will be close to
Int.MAX_VALUE
(which is about 2 billion)
j
Thanks Sam!