Hacker News new | ask | show | jobs
by sfn42 567 days ago
The difference between an arraylist with correct initial size and an array is almost nothing. Arraylist itself is just a wrapper around an array.
1 comments

It can be a big difference if boxing is involved. Or if the list is very big, because all access to items in the list require casting at the bytecode level (due to type erasure).