"Fred" and "47" are literals so they will go into the
string pool and no object will be created...but s=s+"47" will create a new object has s+"47" isnt a constant...so till now only 1 object....14. creates one and line 15 creates one
am sure you arent clear about this but similar question was asked some days back