Hi all, Can u pls tell me how many objects are created with the following code? String s1 = new String("Hi") + "there" + "everyone"; String s2 = s1; Thanks.
Oh, and old classic is back. I believe 4 objects are created: 3 strings in the common area, containing the strings "Hi", "there" & "everyone" and a forth string containing the combined string. s1 & s2 are just references to the last string. Maybe the forth string has a copy in the common area, but I don't think so. /Mike