Passing a String by Reference in Java?
<p>I am used to doing the following in C:</p>

<pre><code>void main() {
    String zText = "";
    fillString(zText);
    printf(zText);
}

void fillString(String zText) {
    zText += "foo";
}
</code></pre>

<p>output:</p>

<pre>
    foo
</pre>

<p>However, in Java, this does not seem to work; I assume because the String is copied instead of passed by referenced. I thought Strings were Objects, which are always passed by reference (so to speak) in Java? What is going on here? thanks...</p>
