In the following code:
String str1= new String("Hello");
String str2= new String(str1);
I was wondering, What gets passed in when I type (str1)? The literal "Hello" or the address in memory of the String object referenced by str1?
In the memory model, Does it mean that the new object contains the address that would point to the object referenced by str1 OR would it contain the literal "Hello" of its own?
Thank You