How is String immutable if i can change its value? i understand that i am changing the reference only but then why the 1st scenario is not working?
122217
String is immutable. What exactly is the meaning?
109567
How does operator  work when comparing two strings?
12827
Are nullable types reference types?
73730
Are JavaScript strings immutable? Do I need a "string builder" in JavaScript?
33772
Is there any difference in equals and == for String variables?
82400
Why can´t we assign a new string to an char array, but to a pointer?
65960
Why the switch statement cannot be applied on strings?
56522
Why can't I use this code to overwrite a string?
599
Is Java "pass-by-reference" or "pass-by-value"?
60490
Why would one declare an immutable class final in Java?
154049
why does if("string") evaluate "string" as true but if ("string"==true) does not?
15023
Mutable vs immutable objects
149735
Are objects in PHP passed by value or reference?
816
What is the difference between a variable, object, and reference?
21767
What is the difference between string primitives and String objects in JavaScript?
59843
PHP DOMElement is Immutable. = 'No Modification Allowed Error'
91943
What is the use of "ref" for reference-type variables in C#?