Question
Which statement about Dynamic Arrays and Resizing is the strongest interview answer?
- Dynamic Arrays and Resizing is mostly a naming style choice and has little effect on runtime or design.
- Dynamic Arrays and Resizing exists mainly to reduce the number of Java files in a project.
- A dynamic array keeps a resizable backing array and grows by allocating a larger array and copying existing elements.
- Dynamic Arrays and Resizing matters only for frontend frameworks, not for core Java applications.
Hint
Start with the core rule behind Dynamic Arrays and Resizing.
Answer and rationale
Correct answer: C. A dynamic array keeps a resizable backing array and grows by allocating a larger array and copying existing elements.
A dynamic array keeps a resizable backing array and grows by allocating a larger array and copying existing elements. This is the base concept interviewers commonly test first.
Track: Java