For ArrayList, it should be dealt with every day during development. We all know that its bottom layer is implemented by arrays, but to be honest, I can't tell the truth about the specific implementation details of its bottom layer, so open its source code and explore it. after all: