 <p>A String being immutable means you can't <em>alter</em> the string; it says nothing about replacing the contents of a String variable with a new string.</p> <p>Your output has nothing to do with the mutability (or not) of Strings, as you never try to change a String. You <em>do</em> try to change an argument from within a function, but because Java passes everything by value, while <code>str2</code> will in fact be <code>"Hi"</code> inside of <code>tell</code>, that assignment will have no effect on <code>str1</code> (as you have seen).</p>