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