Java: Which statement about ArrayList vs LinkedList is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about ArrayList vs LinkedList is the strongest interview answer?

  1. ArrayList vs LinkedList is mostly a naming style choice and has little effect on runtime or design.
  2. ArrayList is usually the better general-purpose list because indexed access and iteration are cache-friendly.
  3. ArrayList vs LinkedList exists mainly to reduce the number of Java files in a project.
  4. ArrayList vs LinkedList matters only for frontend frameworks, not for core Java applications.

Hint

Start with the core rule behind ArrayList vs LinkedList.

Answer and rationale

Correct answer: B. ArrayList is usually the better general-purpose list because indexed access and iteration are cache-friendly.

ArrayList is usually the better general-purpose list because indexed access and iteration are cache-friendly. This is the base concept interviewers commonly test first.

Track: Java