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
No comments:
Post a Comment