Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
cypressious
· 3y ago · 0 comments
The default size of an ArrayList has been 0 for a while. On the first insertion, it is initialized to 10.
Comments
[–]
alex3305
3y ago
That's a bit semantic, isn't it? Because in practice it's still 10, but lazily initialized [1]. And an empty ArrayList is useless anyway.
1.
https://stackoverflow.com/a/34250231