Hacker News new | ask | show | jobs
by stonemetal 2972 days ago
>The effect of this function will be DIFFERENT.

Obviously the output will be different the input was different. The equivalent C code would have passed pointers. In that case the behavior would have been identical passed in values not swapped contents swapped. Just because Java only has object references, doesn't mean they aren't references.