title: Replacing unknown substring?
body: <pre><code>public static String updatedStr(){
  
    String [] ar= {"green","red","purple","black"};
    String str="The colors are (blue), (blue), and (yellow). I prefer (orange)";
  </code></pre>
  
  <p>I would like a final output string of "The colors are green, red, and purple. I prefer black."</p>