Why doesn\'t this work?
private List xShot = new ArrayList();
...codes
...codes
...codes
...codes
xSho
Although xShot.get(0) is a number, it is not a variable. You need to provide a variable for this to work. That said
int i = xShot.get(0);
i += 5;
Will not work. i
will be incremented by 5, but xShot's object in location 5 is not the same object. You need to get, modify, and set the variable.
For example:
xShot.set(0, xShot.get(0) + 5);