3 ms·
Yes, 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); Syste
by itronitron 9y ago
Yes, 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