public
synchronized StringBuffer insert(int offset, char c)
Inserts
the string representation of the char 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(), 'a'); System.out.println(str); } }
Output
String str is a
No comments:
Post a Comment