Skip to content
Sharp

Collections · interview question

Which collection automatically resizes itself to accommodate new elements?

Multiple choiceEasychapter-4-curatedpremiumcollectionscollection-performance-basics
Choose one answer
Answer and explanation

Correct answer

D. ArrayList

Why

ArrayList automatically resizes its internal array when elements are added beyond its current capacity, providing dynamic array behavior.

Test yourself on Collections

A free test with instant, explained results. No account needed.

Start free test
All Collections questions →