News for hackers. Stuff that matters.
Re:Python, as Reviewed by a C++ Programmer by E6300 on Sunday April 23, 2017 @02:01PM (#14179393)
You got it backwards. The Java snippet will print "Lassie". In Java, object names are references to objects, and passing them to functions copies the references, so of course modifying the formal parameter (d from replaceDogWithToby()) doesn't modify the actual parameter (d from main()).

There are no comments on this comment yet.