Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized?

Review the verified answer and explanation for this DemoPaper-Pakistan past-paper question on CampusFin.

Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized? Answer: java.util.ArrayList

All of the collection classes allow you to grow or shrink the size of your collection. ArrayList provides an index to its elements. The newer collection classes tend not to have synchronized methods. Vector is an older implementation of ArrayList functionality and has synchronized methods; it is slower than ArrayList.

Question context

This question is part of ☕ Java Programming within the broader 💻 Programming subject and appears in the DemoPaper-Pakistan preparation collection. Reviewing the answer together with nearby questions helps reinforce the underlying concept and identify how it may appear in competitive exams.