Introduction to ArrayList

AP Computer Science A· difficulty 4/5

When ArrayList exceeds its internal capacity:

  • A

    Throws exception

  • B

    Internally allocates a larger array and copies elements (amortized O(1) add)

    check_circle
  • C

    Stops accepting new elements

  • D

    Becomes null

Explanation

Resizable; growing is automatic.

Want 10 more like this — adaptive to your weak spots?

Related questions

AP Computer Science A · Introduction to ArrayList Practice Question | Acemy