3 ms·
So in that last example, someDog after you have finished the function foo() will be called Max... is this right?
by chris_wot 9y ago
So in that last example, someDog after you have finished the function foo() will be called Max... is this right?
- itronitron 9y agoYes, if you call the function like this, then Max will be the name of the dog when the function returns... Dog someDog = new Dog("Fifi"); foo(someDog); System.out.println(someDog.getName()); // name will be Max