I am trying to understand Java.
Let’s assume I have an ArrayList of size 50 and pre-populated with some names.
Let’s assume I remove 3rd and 4th element from the array list. What will happen to my array list? Will it get rearranged? Will it return null if I try to access the now-deleted 3rd and 4th elements?
Usually you use java collections as a dynamic storage, without defining the size.
For static pre-defined collections you use java arrays.