Array Creation and Access

AP Computer Science A· difficulty 2/5

For <code>int[] a = {10, 20, 30};</code>, <code>a[1]</code> is

  • A

    20

    check_circle
  • B

    Out of bounds

  • C

    10

  • D

    30

Explanation

Index 1 is the SECOND element (20).

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

Related questions