How can this be if I can create a String, giving it a value. Then, I can simply overwrite its value like this:
String a="abc";
a="def";
How is it possible that I can change the value of a
? I must be missing something here. I understand that Strings literals are used whenever creating a String object, rather than creating a new instance of String every time
Please help, thanks.