Quick question here: why not ALWAYS use ArrayLists in Java? They apparently have equal access speed as arrays, in addition to extra useful functionality. I understand the
Performance should not be your primary concern.
Use List
interface where possible, choose concrete implementation based on actual requirements (ArrayList
for random access, LinkedList
for structural modifications, ...).
You should be concerned about performance.
Use arrays, System.arraycopy
, java.util.Arrays
and other low-level stuff to squeeze out every last drop of performance.