title: StringBuilder vs. String considering replace
body: <p>When doing concatenating lots of strings, I have been recommended to do it using a <code>StringBuilder</code> as such:</p>
  
  <pre><code>StringBuilder someString = new StringBuilder("abc");
  someString.append("def");
  someString.append("123");
  someString.append("moreStuff");
  </code></pre>
  
  <p>as opposed to </p>
  
  <pre><code>String someString = "abc";
  someString = someString + "def";
  someString = someString + "123";
  someString = someString + "moreStuff";
  </code></pre>
  
  <p>which would result in the creation of quite a few Strings, as opposed to one.</p>
  
  <p>Now, I need to do a similar thing, but instead of using concatenation I use the <code>replace</code> method of String as such:</p>
  
  <pre><code>String someString = SOME_LARGE_STRING_CONSTANT;
  someString = someString.replace("$VARIABLE1", "abc");
  someString = someString.replace("$VARIABLE2", "def");
  someString = someString.replace("$VARIABLE3", "123");
  someString = someString.replace("$VARIABLE4", "moreStuff");
  </code></pre>
  
  <p>To accomplish the same thing using StringBuilder, I have to do this, just for one replace:</p>
  
  <pre><code>someString.replace(someString.indexOf("$VARIABLE1"), someString.indexOf("$VARIABLE1")+10, "abc");
  </code></pre>
  
  <p>So my question is: "Is it better to use String.replace and have lots of extra Strings created, or to use StringBuilder still, and have lots of long winded lines such as the one above?"</p>