1Z0-829 Working with Arrays and Collections Practice Question
Which of the following correctly converts an array of strings to a List?
⚠ Common exam trap
Candidates often confuse `Arrays.asList()` with creating a fully mutable `ArrayList`, or they think `List.of()` returns a mutable list, but the exam specifically tests the fixed-size, array-backed nature of `Arrays.asList()` versus the immutability of `List.of()`.
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
✓
Arrays.asList(array) returns a fixed-size list backed by the array.
`Arrays.asList(array)` returns a fixed-size list backed by the original array, meaning changes to the list (like `set`) reflect in the array, but structural modifications (like `add` or `remove`) throw `UnsupportedOperationException`. This is the standard, exam-relevant way to convert an array to a List in Java.
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.toList(array) converts the array.
Why it's wrong here
No such method exists in Collections class.
- ✗
List.of(array) returns a mutable list.
Why it's wrong here
List.of returns an immutable list; any attempt to modify it throws UnsupportedOperationException.
- ✓
Arrays.asList(array) returns a fixed-size list backed by the array.
Why this is correct
Arrays.asList returns a list view of the array, fixed-size and mutable via set operations.
- ✗
Arrays.asList(array) returns a new ArrayList with a copy of the elements.
Why it's wrong here
It returns a List view, not a new ArrayList; modifications to the list affect the array.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 1Z0-829 question from scratch — 513 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.