We have an operation as such:
animal[i] = animal[i+1]
when using an array in java. But I'm confused on how Array List works in Java and I'm wondering, what is the equivalent operation for an Array List as of above?
Would it be something like:
animal.get(i) = animal.get(i+1) ?
I'm getting an error saying "the left side must be a variable" if i do so, so i assume I'm doing it wrong?