2D Arrays: Creation and Access

AP Computer Science A· difficulty 4/5

A 2D array in Java is fundamentally

  • A

    A contiguous block in memory

  • B

    An array of arrays (each row is its own object)

    check_circle
  • C

    A linked list

  • D

    A flat 1D array with index calc

Explanation

<code>int[][]</code> is <code>int[]</code> (rows) of <code>int[]</code> (cols).

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

Related questions