ArrayList - remove element, shifting list down?
This is a pretty straight-forward question... Just couldn't really find a
straight-forward answer on the web.
Consider I have a List<String> listOfStrings = new ArrayList(); and it is
populated with 20 values.
If listOfStings.get(0) = zero, listOfStrings.get(1) = one, etc...
and I do listOfStrings.remove(0)
would listOfStrings.get(0) become null, or would the elements shift down
so listOfStrings.get(0) becomes one?
No comments:
Post a Comment