Programming, Java, Lists, Data Structures.
lines 1&2 that ArrayList is nothing but a wrapper over Object array. Let’s look at what add method is doing. Public add(E e) is calling parametrized add method with an array of current elements and size. Parametrized add method at line 4, first checks if the size of the list and elementData array