What are the consequences if we store huge objects collection in Arraylist when it is not expecting them (i.e we may initialized the Arraylist to accommodate 10/100/1000 objects, however at runtime we might store some 100 thousand objects).
and which is better out of below two in case we know this will happen at some point of time. 1).To create a empty arraylist or 2).Create a arraylist with predefined case. or both doesnt matter they are same???