What is the expected behavior of a Java non-primitive data type when it is passed as an
Fantastic news! We've Found the answer you've been seeking!
Question:
What is the expected behavior of a Java non-primitive data type when it is passed as an argument to a method?
A. The value is copied to the method, and any changes made within the method will not affect the original variable.
B. The value is passed by reference to the method, and any changes made within the method will affect the original variable.
C. The value is passed by reference to the method, but any changes made within the method will not affect the original variable.
D. The value is copied to the method, and any changes made within the method will affect the original variable.
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date: