public class Main {
public static void main
(String[] args
) { StringBuilder text = new StringBuilder("Hello world!");
text.replace(1, 2, "World");
// text.setLength(text.length() - 1);
}
}
cHVibGljIGNsYXNzIE1haW4gewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHsKCQlTdHJpbmdCdWlsZGVyIHRleHQgPSBuZXcgU3RyaW5nQnVpbGRlcigiSGVsbG8gd29ybGQhIik7CgkJdGV4dC5yZXBsYWNlKDEsIDIsICJXb3JsZCIpOwoJCS8vIHRleHQuc2V0TGVuZ3RoKHRleHQubGVuZ3RoKCkgLSAxKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4odGV4dCk7Cgl9Cn0=