fork download
  1. public class Main {
  2. public static void main (String[] args) {
  3. StringBuilder text = new StringBuilder("Hello world!");
  4. text.replace(1, 2, "World");
  5. // text.setLength(text.length() - 1);
  6. System.out.println(text);
  7. }
  8. }
Success #stdin #stdout 0.09s 52528KB
stdin
Standard input is empty
stdout
HWorldllo world!