fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. StringBuilder sb = new StringBuilder("abcdefgh");
  9. sb.replace(2, 3, "x");
  10. String output = sb.toString();
  11. System.out.println(output);
  12. }
  13. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
abxdefgh