Java · Arrays
Moving elements inside one array can overwrite a value before it is used, so the order of the copies decides the result.