is the object created at line 2 elligible for GC after line 4 executes.
posted 12 years ago
Yes. Remember, Strings are immutable objects. Therefore, performing a concatenation operation creates a brand new String. It does not reference the existing Strings that were used in the concatentation. Therefore, the object is eligible for garbage collection after line 4. I hope that helps, Corey