StringBuffer Class
nUse the StringBuffer
class when you are constructing a string dynamically and you want to
maximize efficiency.
nTo learn more about
the StringBuffer class, use Google: "StringBuffer class"
String palindrome = "Dot saw I was Tod";
int len = palindrome.length();
StringBuffer dest = new StringBuffer(len);
for (int i = (len - 1); i >= 0; i--) dest.append(palindrome.charAt(i));