ArrayList Methods

AP Computer Science A· difficulty 4/5

<code>list.add(x)</code> returns

  • A

    boolean (true if added; for List always true)

    check_circle
  • B

    int (new size)

  • C

    The added element

  • D

    void

Explanation

For ArrayList.add(E), returns true (Collection contract).

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

Related questions