The reason for this has to do with how the ArrayList is implemented. Variables in Java can be divided into two categories: value type (primitive) and reference type (reference type) variables.
First of all, several of the other answers are misleading and/or incorrect. Note that an array is an object. So you can use them as elements in a list, no matter whether the arrays themselves contain ...
So far, we have found ourselves using arrays to store most of our data. However, we have also noticed some limitations with arrays: You need to know the maximum size when you allocate it. You can’t ...