Java Puste tablic List vs Null Elements
The difference is in the List size, not its capacity.
When instantiating a new ArrayList<>(5), the initial capacity is set to 5,
but the size remains 0, because we haven't added any elements.
If we invoke add(null) only the elements size() will increase
and all functions iterating through the array of elements
will remain inbetween the size of the List, not the capacity.
Atomiz