In my Data Structures class we have studies the Java ArrayList class, and how it grows the underlying array when a user adds more elements. That is understood. However, I ca
There is not much gain by resizing the ArrayList internal array, even you are using ArrayList to hold a large object.
List list = new ArrayList();
list will only hold reference to LargeObject instance, and not holding LargeObject instance itself.
Reference doesn't consume much space. (Think it as pointer in C)