ArrayList Methods

AP Computer Science A· difficulty 4/5

<code>list.get(100)</code> on a size-3 list throws

  • A

    Returns 0

  • B

    Returns null

  • C

    Returns first element

  • D

    IndexOutOfBoundsException

    check_circle

Explanation

Index validation; throws IOOBE.

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

Related questions