Wednesday, 2 July 2014

append (char[] str)

public synchronized StringBuffer append(char[] str)
Appends the string representation of the char array argument to this sequence.

class StringBufferAppendCharArray{
 public static void main(String args[]){
  StringBuffer s1 = new StringBuffer("Value of s1 is ");
  char c[] = {'c', 'h', 'a', 'r'};
  s1.append(c);
  
  System.out.println(s1);
 }
}

Output
Value of s1 is char




Prevoius                                                 Next                                                 Home

No comments:

Post a Comment