posted 21 years ago
HI All,
Can't understand the output of the question of following questions.
in
Method Arguments
Exam 1
Any further explanation to make it more clear ??
Answer
9 a Prints: 1,1 Although the reference parameter i1 is reassigned inside of m1, the change has no impact outside of m1. Array references are passed by value: the invoked method gets a copy of the array reference.
and
Answer
11 d Prints: 3,1 Inside of method m2, the local variables i1 and i2 remain unchanged while the shadowed instance variables are changed.
Thanks in advance,
"The man who can drive himself further once the effort gets painful is the man who will win." <br />Roger Bannister