Gif can be very confusing by implying that after passing an object as a method argument, you can do whatever you want with it without changing the original object.
As you know, only the reference to the object is copied (finally we have two references) which still points to the same object and any modification to it will be reflected in the source object (on the heap) to which these references point.
The above gif only applies in the context of passing primitives.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Gif can be very confusing by implying that after passing an object as a method argument, you can do whatever you want with it without changing the original object.
As you know, only the reference to the object is copied (finally we have two references) which still points to the same object and any modification to it will be reflected in the source object (on the heap) to which these references point.
The above gif only applies in the context of passing primitives.