I came across below comment on this question thread :
Because the CopyOnWriteArrayList is for safe traversals. The cost of using it is duplicating the underlying array of references for each modification and possibly retaining multiple copies for threads iterating over stale versions of the structure. A ReadWriteLock would allow multiple readers and still let the occasional writer perform the necessary modifications
I have just started learning about CopyOnWriteArrayList, can someone please elaborate what does the above statement mean?How does a random access read instead of iteration, make the ReadWriteLock a better option?