Mega Code Archive

 
Categories / Java Tutorial / Development
 

Inserting Strings

public class MainClass {   public static void main(String[] arg) {     StringBuffer phrase = new StringBuffer("one two three four");     phrase.insert(4, "old");          System.out.println(phrase);        } } one oldtwo three four