When developing an Android App I faced with the situation when there is no element in non-empty Java ArrayList with zero index. The reason of the problem is somehow connected with the fact that I sometimes delete the zero-indexed items with list.remove(0) method when the list is non-empty. Nevertheless the specification on the remove method says that it "Shifts any subsequent elements to the left (subtracts one from their indices)". So I can't understand what is the reason of situations (it happens sometimes) when I get a non-empty list with no zero element (the first element has index 1). I can see no zero element both by getting an NullPointerException on list.get(0) and by seeing ArrayList content in Android Studio Debugger.
Debugging screenshot - ArrayList's shapshot with no zero item in Android Studio