# How to remove a specific object from an Arraylist

**URL:** <https://discourse.processing.org/t/how-to-remove-a-specific-object-from-an-arraylist/24599>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [October 14, 2020, 2:54pm UTC](https://discourse.processing.org/t/how-to-remove-a-specific-object-from-an-arraylist/24599 "2020-10-14T14:54:47Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [October 14, 2020, 5:29pm UTC](https://discourse.processing.org/t/how-to-remove-a-specific-object-from-an-arraylist/24599/5 "2020-10-14T17:29:45Z")

</div>

> [@Chrisir](#):
>
> , use a for loop which must go backward.

> [@Table removeColumn(index) not working correctly?](https://discourse.processing.org/t/table-removecolumn-index-not-working-correctly/17585/4):
>
> For completeness’ sake, although I prefer backwards back loops for deleting elements, here’s how to do the same w/ a forward arrow_forward loop the right way: smile_cat final IntList nums = IntList.fromRange(10); println(nums); println("Forwards:"); for(int i = 0; i \< nums.size(); ++i) { println("index:", i, TAB, "value:", nums.get(i)); nums.remove(i--); } println(nums); exit(); B/c we’re emptying the whole container, the index i is stuck at value 0 on all iterations. open_mouth …

---

_[View the full topic](https://discourse.processing.org/t/how-to-remove-a-specific-object-from-an-arraylist/24599)._
