StringBuffer.append(CharSequence s) has the following syntax.
public StringBuffer append(CharSequence s)
In the following code shows how to use StringBuffer.append(CharSequence s) method.
public class Main { //from www. j a v a2 s . 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.