StringBuilder.append(CharSequence s) has the following syntax.
public StringBuilder append(CharSequence s)
In the following code shows how to use StringBuilder.append(CharSequence s) method.
public class Main { /*from w w w . j a va2 s . c o m*/ 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.