Monday 7 July 2014

insert (int offset, boolean b)

public StringBuffer insert(int offset, boolean b)
Inserts the string representation of the boolean argument into this sequence at the indicated offset.

public class StringBufferInsert {
    public static void main(String args[]){
        StringBuffer str = new StringBuffer("String str is ");
        str.insert(str.length(), true);
        System.out.println(str);
    }
}

Output
String str is true



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment