Multiple choice technology web technology

how much memory is allocated for a? List a = new ArrayList();

  1. 0

  2. 10

  3. null

  4. 1

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

When creating a new ArrayList using the default constructor in Java, the initial capacity is set to 10. This means memory is allocated for 10 object references initially. The ArrayList will dynamically resize if more elements are added beyond this capacity.