Multiple choice technology programming languages

What are the constructors of ArrayList?

  1. ArrayList( )

  2. ArrayList(Collection c)

  3. ArrayList(int capacity)

  4. All of the Above

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

ArrayList has three constructors: a no-arg constructor creating an empty list with default capacity (10), one accepting a Collection to initialize with elements, and one accepting an initial capacity integer. All three are valid and commonly used.