Demonstration of passing object reference by value as parameter in java methods .
ATTEMPTING TO REASSIGN OBJECT .
If you reassign an object reference inside java method it do not affect the original state of object outside that method .Below is an demonstration ,that shows java passes object reference by value .
public class n {
...
setter.hashnode.dev2 min read