Traversing 2D Arrays

AP Computer Science A· difficulty 3/5

<code>m[0] = new int[]{9, 9, 9};</code> for a 3-col matrix m

  • A

    Compile error

  • B

    Replaces all rows

  • C

    Throws exception

  • D

    Sets first row's elements to 9, 9, 9

    check_circle

Explanation

Reassign the row reference to a new array.

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

Related questions