Another class's static function does not modify the reference passed in
<p>Just got really confused why this is happening:</p>

<pre><code>public class OneClass {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder("1111");
        AnotherClass.updateParameter(sb);
        System.out.print(sb);
    }
}

public class AnotherClass {
    public static void updateParameter(StringBuilder args) {
        args.append("2222");
    }
}

Output: 1111
</code></pre>

<p>Can anyone please explain, thanks a lot!</p>
