Initial capacity refers to the starting size or capacity allocated for an ArrayList when it is created using its constructor. It determines how many elements can be stored in the list before it needs to dynamically resize itself.
Related terms
resize(): This operation increases or decreases the size/capacity of an array-based data structure like an ArrayList.
ensureCapacity(): This method ensures that an ArrayList has enough space allocated for a specified number of elements without needing frequent resizing.
trimToSize(): This method reduces the capacity of an ArrayList to match its current size, freeing up any excess memory.