Look at the String API:
String replace(char oldChar, char newChar)
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar
So on line 3. String reference
a will be replaced by a reference to a new String object.
The original string "Hellp" that was referred to by
a will remain unreferenced in the string literal pool.
[ November 04, 2004: Message edited by: Barry Gaunt ]