📅  最后修改于: 2022-03-11 14:52:48.604000             🧑  作者: Mango
String str = in.nextLine(); //Original String
char cr = in.next().charAt(0); // character to replace
int index = in.nextInt(); // Index where replaced
str = str.substring(0, index) + cr + str.substring(index + 1);// modified string