String q = new String(“Cat”); String r = q; String s = new String(r);
I understand that the first line would equate to
String q = "Cat"; and the second would be
String r = q;, but what would the last one equate to without using new? I originally thought it was the same as the second line, but later it says that two string objects are created.