ArrayList will grow and shrink implicitly
Hi,
I have an ArrayList which is going to hold 1000 elements, hence I have defined the List as :-
List list = new ArrayList(1000);
If the number of elements is less than 1000 , in such case whether the ArrayList will shrink implictly and similarly
if the number of elements grows from 1000 to 1500 whether the ArrayList will increase the size implicitly to 1500?
I know that ArrayList will increase the size of its internal array to 50 % when compared to Vector?
If the above wont happen then it will be a problem as unnecessary memory space will be available List?
Please clarify.
Thanks.