Larry Chung wrote:No, I think what Harpreet was describing was actually Pass by Value. The address value of the actual object was passed into the modify() method. Internally in the modify() method, the tc variable initially has that address value but then was given another address when the method instantiated a new TestClas object for the tc variable to point at.
Hi,
Larry Chung
have a look at this
link
if we make a alternation to the reference variable, which we pass to the method, modify() rather than instantiating new one, It'll affect the object referenced by the reference variable
tc(in that main method reference variable).
it's true that object can't pass, only the reference variable value(bit
pattern).... But we called it as Pass by reference.