1Z0-829 Working with Arrays and Collections Practice Question
Which TWO of the following statements about the Collections framework are true?
⚠ Common exam trap
Many candidates confuse `Collections.unmodifiableList()` with `List.of()` or assume that `Arrays.asList()` returns a fully mutable list of variable size, when in fact it returns a fixed-size list backed by the array.
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
✓
Collections.unmodifiableList returns an unmodifiable view of the list.
`Collections.unmodifiableList()` returns a view of the specified list that cannot be modified. Any attempt to modify the returned list (e.g., add, remove, set) will throw an `UnsupportedOperationException`. This is a standard method in the Java Collections Framework to provide read-only access to a list.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Collections.checkedList performs type checking at compile time.
Why it's wrong here
Incorrect: checkedList performs runtime type checking when elements are added.
- ✓
Collections.unmodifiableList returns an unmodifiable view of the list.
Why this is correct
Correct: it wraps the list to prevent modifications.
- ✗
List.of returns a mutable list.
Why it's wrong here
Incorrect: List.of returns an immutable list; any modification throws UnsupportedOperationException.
- ✓
Collections.synchronizedList returns a thread-safe list.
Why this is correct
Correct: it synchronizes all methods to ensure thread safety.
- ✗
Arrays.asList returns a mutable list of variable size.
Why it's wrong here
Incorrect: the list is mutable but fixed-size; add/remove throw UnsupportedOperationException.
Go deeper
Related to this question
About these practice questions
This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.