Pass by "Reference Value"? Some clarification needed
<p>I know that in Java, everything is passed by value.  But for objects, it is the value of the reference to the object that is passed.  This means that sometimes an object can get changed through a parameter, which is why, I guess, people say, Never modify parameters.</p>

<p>But in the following code, something different happens.  <code>s</code> in <code>changeIt()</code> doesn't change when you get back to <code>main()</code>: </p>

<pre><code>public class TestClass {

    static String str = "Hello World";

    public static void changeIt( String s ) {
        s = "Good bye world";
    }

    public static void main( String[] args ) {
        changeIt( str );
        System.out.println( str );
    }
}
</code></pre>

<p>I'm guessing -- and I'd like confirmation -- that when you say <code>s = "something"</code> it's the same or equivalent to saying <code>String s = new String("something")</code>.  Is this why <code>s</code> doesn't change?  Is it assigned a whole new object locally which gets thrown away once you exit <code>changeIt()</code>? </p>
