how are String objects immutable in this case?
<p>I agree with the fact that the String objects are immutable, means they cannot be modified. Like in the case below</p>

<pre><code>String str = "Hi";
String str1 = str.concat("Nilesh");
</code></pre>

<p>Here the str object will be returned if the length argument is 0 or a new String object will be created and its reference will be returned.
And if i do</p>

<pre><code>String str = "Hi";
str="Hello";
</code></pre>

<p>How is it getting changed? where does immutable comes into picture? An example please.</p>
