Developing Algorithms Using Arrays

AP Computer Science A· difficulty 3/5

Passing an array to a method passes

  • A

    A copy of the array

  • B

    Just length

  • C

    Compile error

  • D

    A reference to the array (changes affect caller)

    check_circle

Explanation

Arrays are objects; reference is passed by value.

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

Related questions