Java StringBuffer .append ( CharSequence s)
Syntax
StringBuffer.append(CharSequence s) has the following syntax.
public StringBuffer append(CharSequence s)
Example
In the following code shows how to use StringBuffer.append(CharSequence s) method.
public class Main {
//from w w w . ja v a 2s. c o m
public static void main(String[] arg) {
StringBuffer buffer = new StringBuffer();
CharSequence cs = "java2s.com";
buffer.append(cs);
System.out.println(buffer);
}
}
The code above generates the following result.