posted 24 years ago
Three should be the correct answer..
<code>
String s1,s2,s3,s4;
s1="Hello";
s2=s1;
s3=s1+"Bill";
s4=s3;
</code>
first: "Hello";
second: "Bill";
and the third "HelloBill";
well Im not totally sure about this, but I would have answered 3 becouase String objects are inmutable so in the line
s3=s1+"Bill"; a third String is being created.
Any body agree with me ?
------------------