CopyOnWriteArrayList in Java: When It Wins (JMH) and When It Hurts
CopyOnWriteArrayList trades an expensive, array-copying write for a lock-free read and an iterator that can never throw ConcurrentModificationException. This rewrite backs that trade-off with real JMH read/write throughput benchmarks, two deterministic concurrency demos built on CountDownLatch barriers instead of Thread.sleep guesses, a genuine concurrent-writer race condition caught and fixed mid-benchmark, and a javap-verified correction: the internal lock is a plain Object monitor, not a ReentrantLock.