Y
Hacker News
new
|
ask
|
show
|
jobs
by
cypressious
1026 days ago
The default size of an ArrayList has been 0 for a while. On the first insertion, it is initialized to 10.
1 comments
alex3305
1026 days 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
link
1. https://stackoverflow.com/a/34250231