Thursday 3 July 2014

append (int i)

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

public class StringBufferAppendInt {
    public static void main(String args[]){
        StringBuffer s1 = new StringBuffer("Value of s1 is ");
        int i = 10;
        s1.append(i);
  
        System.out.println(s1);
    }
}

Output
Value of s1 is 10



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment