Wednesday, 2 July 2014

append (char c)

public synchronized StringBuffer append(char c)
Appends the string representation of the char argument to this sequence.

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

Output
Value of s1 is c




Prevoius                                                 Next                                                 Home

No comments:

Post a Comment