posted 20 years ago
Hi,
In Line 1 s2 point s "def", Line 2 s3 points "def" because s2 has a reference value of string object "def". So s3 also point to "def" in Line 3 you change the reference value of s2. It point to the object "ghi". So s3 reference values are not updated here. So output is abcghidef.
Raghu J<br />SCJP 1.4<br /> <br />The Wind and waters are always<br />on the side of the ablest navigators.<br /><a href="http://groups.yahoo.com/group/scjp_share" target="_blank" rel="nofollow">SCJP Group</a><br /><a href="http://groups.yahoo.com/group/JavaBeat_SCWCD" target="_blank" rel="nofollow">SCWCD Group</a>