when i write the statement
String s = new String("abc") ;
There are two string objects created right??
so in the code below how many string objects are actually created.
String s1 = "abc";
String s2 = new String("xyz");
String s3 = "abc" ;
String s4 = s3.replace('a','A');
well i think in all five objects are created.
please correct me if i am wrong.