The fact that the replace method returns a string object rather than replacing the contents of a given string is a little obtuse (but understandable when you know that strin
I agree with the above. Use StringBuffer for thread-safety and StringBuilder when working with single threads.