title: Replacing string contents without using replace or replaceAll
body: <p>I have a String variable:</p>
  
  <pre><code>String str = " abc boy abc funny os abc abcifff abc abc boy abc";
  </code></pre>
  
  <p>I want to replace "abc" as "the", which would result in:</p>
  
  <pre><code>the boy the funny os the abcifff the the boy the
  </code></pre>
  
  <p>How can I do this without using <code>replace</code> or <code>replaceAll</code>?</p>