How do I insert a character at a specific index in a string
How do I insert a character at a specific index in a string builder variable? 
 
 
 
 
 For example:
 StringBuilder temp = new StringBuilder(how to);
 I want to insert char \'j\' at temp[3];
 Temp would now = howj to.
 Thanks.
 How do I insert a character at a specific index in a string builder variable? 
 
 
 
 
 For example:
 StringBuilder temp = new StringBuilder(how to);
 I want to insert char \'j\' at temp[3];
 Temp would now = howj to.
 Thanks.
 For example:
 StringBuilder temp = new StringBuilder(how to);
 I want to insert char \'j\' at temp[3];
 Temp would now = howj to.
 Thanks.
Solution
public class StringBuilderDemo {
public static void main(String[] args) {
StringBuilder temp = new StringBuilder(\"how to\");
// insert character value at position 3
 temp.insert(3, \'j\');
System.out.println(temp.toString());
 }
 }
/* sample output
howj to
*/

