Java StringBuilder.append(char[] str)
Syntax
StringBuilder.append(char[] str) has the following syntax.
public StringBuilder append(char[] str)
Example
In the following code shows how to use StringBuilder.append(char[] str) method.
/*from w w w . ja va 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.