That’s right!
My answer was a bit too short.
For example you for loop over all rubbish:
When the Distance to the mouse is < 18 (use dist() command) set a marker boolean isDead (which is in the class) to true (initially in the class say boolean isDead=false;).
Remove from the ArrayList
Now later in draw() you for-loop over the rubbish backwards and check isDead:
for(int i=list.size()-1; i >= 0; i--) {
Rubbish item=list.get(i); `
if (item.isDead)
list.remove(i);
}
Chrisir