P粉8181258052023-08-19 00:11:11
The reason is that if you run the following code to remove the 0th element:
select.remove(0);
The 2nd and 3rd elements will no longer be the 2nd and 3rd, but become the 1st and 2nd because the 0th element has been removed.
The quick solution is to remove from the largest index to the smallest index:
select.remove(3); select.remove(2); select.remove(0);