在java里String 对象是不动态改变长度的,只有先转化成StringBuffer,插入处理后在转回。如StringBuffer str = new StringBuffer("Thanks for your help");String strInsert = "useful";str.insert(16,strInsert + " ");System.out.println(str.toString());