Java – ArrayList – Delete element, move down list?

ArrayList – Delete element, move down list?… here is a solution to the problem.

ArrayList – Delete element, move down list?

This is a very straightforward question… Just can’t really find straightforward answers on the web.

Suppose I have a List<String> listOfStrings = new ArrayList(); It is populated with 20 values.

If listOfStings.get(0) = zero, listOfStrings.get(1) = one, etc….

I’m also listOfStrings.remove(0).

ListOfStrings.get(0) becomes null, or the element moves down
listOfStrings.get(0) becomes one ?

Related Problems and Solutions