The Java ArrayList class has only two data members, a reference to the Object[] array and the size you need if you are not using an ArrayList . Therefore, the only advantage of not using ArrayList is the preservation of a single distribution of objects, which is unlikely to ever be of great importance.
If you create and delete many, many instances of your container class (and, in turn, your ArrayList instance) every second, you may have a little garbage collection problem, but something to worry about is this ever happening. Garbage collection is usually the least of your worries.
John calsbeek
source share