Courseiva
Working with Arrays and CollectionsmediumMultiple SelectObjective-mapped

1Z0-829 Working with Arrays and Collections Practice Question

Which TWO statements are true about creating an unmodifiable List?

⚠ Common exam trap

A common mix-up: candidates confuse 'unmodifiable view' (where the backing list can still change) with 'immutable list' (where the list itself cannot change at all), leading them to incorrectly think `Collections.unmodifiableList()` makes the backing list safe from all modifications.

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 a view that is unmodifiable, but the backing list can still be changed.

A is correct because `Collections.unmodifiableList()` returns a view of the backing list that cannot be modified through the returned reference, but any changes made to the original backing list are reflected in the view. This means the view is unmodifiable but not immutable, as the underlying list can still be mutated.

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.unmodifiableList() returns a view that is unmodifiable, but the backing list can still be changed.

    Why this is correct

    View is unmodifiable, backing list change reflected.

  • List.of() returns an immutable list that does not support any modification.

    Why this is correct

    Truly immutable.

  • List.copyOf() creates a list that, if the source list is changed, the copy also changes.

    Why it's wrong here

    copyOf creates independent immutable copy.

  • new ArrayList<>(Arrays.asList(...)) creates an unmodifiable list.

    Why it's wrong here

    ArrayList is mutable.

  • Arrays.asList() returns an unmodifiable list.

    Why it's wrong here

    Returns fixed-size but modifiable via set().

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 →

How Courseiva writes practice questions · Editorial policy

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.