Creating and Storing Objects (Instantiation)

AP Computer Science A· difficulty 4/5

When passing an object reference to a method, Java passes

  • A

    The reference by value (the method has its own reference variable to the same object)

    check_circle
  • B

    By reference (caller's variable can be reassigned)

  • C

    The whole object by value

  • D

    Deep copy

Explanation

Java is always pass-by-value; for objects, it's the reference value that's copied — both refer to the same object, but reassigning inside the method doesn't affect the caller.

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

Related questions