Java: Which statement about List, Set, and Map is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about List, Set, and Map is the strongest interview answer?

  1. List preserves order, Set enforces uniqueness, and Map stores values by key.
  2. List, Set, and Map is mostly a naming style choice and has little effect on runtime or design.
  3. List, Set, and Map exists mainly to reduce the number of Java files in a project.
  4. List, Set, and Map matters only for frontend frameworks, not for core Java applications.

Hint

Start with the core rule behind List, Set, and Map.

Answer and rationale

Correct answer: A. List preserves order, Set enforces uniqueness, and Map stores values by key.

List preserves order, Set enforces uniqueness, and Map stores values by key. This is the base concept interviewers commonly test first.

Track: Java