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
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.
Step by Step Solution
3.43 Rating (150 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below The correct answer to the MCQ question ... View full answer
Get step-by-step solutions from verified subject matter experts
