I am trying to run 2 concurrent threads, where one keeps adding objects to a list and the other updates these objects and may remove some of these objects from the list as well.
I have a whole project where I've used `ArrayList` for my methods and classes so it's difficult to change it now.

I've looked around and I found a few ways of doing this, but as I said it is difficult to change from `ArrayList`. I tried using `synchronized` and `notify()` for the method adding the objects to the list and `wait()` for the method changing these objects and potentially removing them if they meet certain criteria.

Now, I've figured out how to do this using a `CopyOnWriteArrayList`, but I would like to know if there's a possibility of using `ArrayList` itself to simulate this. so that I don't have to edit my entire code.

So, basically, I would like to do something like this, but with `ArrayList`:

```
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;

public class ListExample{
    CopyOnWriteArrayList<MyObject> syncList;

    public ListExample(){
        syncList = new CopyOnWriteArrayList<MyObject>();

        Thread thread1 = new Thread(){
            public void run(){
                synchronized (syncList){
                    for(int i = 0; i < 10; i++){
                        syncList.add(new MyObject(i));
                    }
                }
            }
        };

        Thread thread2 = new Thread(){
            public void run(){
                synchronized (syncList){
                    Iterator<MyObject> iterator = syncList.iterator();
                    while(iterator.hasNext()){
                        MyObject temp = iterator.next();

                        //this is just a sample list manipulation
                        if (temp.getID() > 3)
                            syncList.remove(temp);

                        System.out.println("Object ID: " + temp.getID() + " AND list size: " + syncList.size());
                    }
                }
            }
        };

        thread1.start();
        thread2.start();
    }

    public static void main(String[] args){
        new ListExample();
    }
}

class MyObject{
    private int ID;

    public MyObject(int ID){
        this.ID = ID;
    }

    public int getID(){
        return ID;
    }

    public void setID(int ID){
        this.ID = ID;
    }
}

```

I've also read about `Collections.synchronizedList(new ArrayList())` but again, I believe this would require me to change my code as I have a substantial number of methods that take `ArrayList` as a parameter.

Any guidance would be appreciated, because I am out of ideas. Thank you.