Multiple choice technology web technology

Which collection class(es) allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized? (Choose all that apply.)

  1. java.util.HashSet

  2. java.util.LinkedHashSet

  3. java.util.List

  4. java.util.ArrayList

  5. java.util.Vector

  6. java.util.PriorityQueue

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

ArrayList is a resizable array implementation that provides indexed access via get(int index) and set(int index, E element) methods. Unlike Vector, ArrayList's methods are not synchronized, making it faster for single-threaded use. HashSet and LinkedHashSet don't provide indexed access. List is an interface, not a concrete class. Vector has synchronized methods. PriorityQueue doesn't support indexed access.