StringBuffer.java
A string buffer is like a {@link String}, but can be modified.At any
point in time it contains some particular sequence of characters, but
the length and content of the sequence can be changed through certain
method calls.Exampl - ReverseString.java
public class ReverseString {
public static String reverseIt(String source) {
int i, len = source.length();
StringBuffer dest = new StringBuffer(len);
for (i = (len - 1); i >= 0; i--)
dest.append(source.charAt(i));
return dest.toString();
}
}