Hello,
I would like to know how many
string objects created from the following first question. If your answer is two. Pls explain the second question. Because it says 8 objects or your answer is three why the K & B drawing show�s two objects (Chapter 6 and page no 6 of 54).
Question: - 1
String x = "Java";
x.concat(" Rules!");
System.out.println("x = " + x);
Question: - 2
String s1 = "spring ";
String s2 = s1 + "summer ";
s1.concat("fall ");
s2.concat(s1);
s1 += "winter ";
System.out.println(s1 + " " + s2);
Thanks, Raghu.K