StringBuilder.append(char[] str) has the following syntax.
public StringBuilder append(char[] str)
In the following code shows how to use StringBuilder.append(char[] str) method.
//w ww . j a v a 2 s . c o m public class Main { public static void main(String[] arg) { StringBuilder buffer = new StringBuilder(); char[] chars = new char[]{'j','a','v','a','2','s','.','c','o','m'}; buffer.append(chars); System.out.println(buffer); } }
The code above generates the following result.