+ 1
Object variables stores references. What does a reference mean?
4 Answers
0
reference
0
reference
- 1
This is the best explanations i've seen:
https://blog.penjee.com/wp-content/uploads/2015/02/pass-by-reference-vs-pass-by-value-animation.gif
When you bass by reference, you are passing the memory address where that object is. So, if you change some value of this in the method that received it by reference, these changes will be reflected on the original variable.
Hope it was helpful,
- 1
reference