第1个回答 2013-12-23
public class StringTestOne {
public static void main(String[] args) {
String s1 = "china is a country";
String s2 = "great";
StringBuffer StringBuffer str1 = new StringBuffer(s1);
StringBuffer str2 = new StringBuffer(s2);
int flag = str1.indexOf(" country");
str1.insert(flag," great");
System.out.println(str1);
}
}
望采纳,谢谢,如有不懂请及时提问