1Z0-829 Working with Arrays and Collections Practice Question
Which TWO statements about the java.util.Collections class are true?
⚠ Common exam trap
It's easy for candidates to confuse mutating methods like sort, reverse, and shuffle with methods that return new collections, when in fact these methods modify the list in place and return void, whereas synchronizedList and unmodifiableList return wrapper views.
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.synchronizedList(List) returns a synchronized list backed by the specified list.
Collections.synchronizedList(List) returns a synchronized (thread-safe) list backed by the specified list. This method wraps the provided list in a synchronized wrapper, ensuring that all access to the underlying list is serialized when accessed through the returned list. It does not create a new independent list but provides a view that synchronizes all method calls.
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.sort(List) returns a new sorted list.
Why it's wrong here
Collections.sort sorts the list in place; it does not return a new list.
- ✗
Collections.reverse(List) returns a new reversed list.
Why it's wrong here
Collections.reverse reverses the order in place.
- ✗
Collections.shuffle(List) returns a new shuffled list.
Why it's wrong here
Collections.shuffle randomizes the list in place.
- ✓
Collections.synchronizedList(List) returns a synchronized list backed by the specified list.
Why this is correct
It returns a thread-safe list backed by the specified list.
- ✓
Collections.unmodifiableList(List) returns an unmodifiable view of the specified list.
Why this is correct
It returns an unmodifiable view; any attempt to modify it throws UnsupportedOperationException.
Visual reference
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.