Originally posted by Mohit Goyal:
K&B pg 355
the fig for step 3 shud show the object with the value "def" on the heap
although no object is reffering to it.
String s = "abc";
String s2 = s;
s = s.concat("def");
I agree with Mohit. It seems "def" is missing on the Fig6-1 (as well as "Rules" missing on Fig6-2,Fig6-3) since it is also another String object created.
[ December 02, 2003: Message edited by: sherry cuenco ]