How do I pass a variable by reference?
Arguments are passed by assignment. The rationale behind this is twofold: the parameter passed in is actually a reference to an object (but the reference is passed by value) some data types are mutable, but others aren’t So: If you pass a mutable object into a method, the method gets a reference to that same object and you can mutate … Read more