fork download
  1. class Example
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. String str = "Here it is: {Name} And again: {Name}";
  6. System.out.println("Before: " + str);
  7. str = str.replace("{Name}","A");
  8. System.out.println("After: " + str);
  9. }
  10. }
Success #stdin #stdout 0.11s 320576KB
stdin
Standard input is empty
stdout
Before: Here it is: {Name} And again: {Name}
After: Here it is: A And again: A