public
synchronized StringBuffer insert(int offset, String str)
Inserts
the string str into this sequence at the indicated offset.
public class StringBufferInsertString { public static void main(String args[]){ String str = new String("wxyz"); StringBuffer s = new StringBuffer("Value of str is "); s.insert(s.length(), str); System.out.println(s); } }
Output
Value of str is wxyz
No comments:
Post a Comment