1Z0-829 Working with Arrays and Collections Practice Question
Which is true about CopyOnWriteArrayList?
⚠ Common exam trap
Candidates often assume 'thread-safe' collections like CopyOnWriteArrayList allow iterators to see concurrent modifications (like ConcurrentHashMap does), but CopyOnWriteArrayList iterators are snapshot-based and do not reflect modifications after creation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Modifications are expensive as they create a new array.
CopyOnWriteArrayList is a thread-safe variant of ArrayList where all mutative operations (add, set, remove, etc.) are implemented by making a fresh copy of the underlying array. This design makes modifications expensive because each modification requires copying the entire array, but it provides safe iteration without locking. Option C correctly identifies that modifications are expensive due to the array copy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It is not thread-safe.
Why it's wrong here
It is thread-safe.
- ✗
Iterators reflect concurrent modifications.
Why it's wrong here
Iterator works on snapshot.
- ✓
Modifications are expensive as they create a new array.
Why this is correct
Each modification copies the underlying array.
- ✗
It is optimized for frequent modifications.
Why it's wrong here
Optimized for read-heavy scenarios.
Go deeper
Related to this question
About these practice questions
One of 513 original 1Z0-829 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.