title: Efficient way to replace chars in a string (java)?
body: <p>I'm writing a small JAVA program which:</p>
  
  <ul>
  <li>takes a text as a String </li>
  <li>takes 2 arrays of chars</li>
  </ul>
  
  <p>What im trying to do will sound like "find and replace" but it is not the same so i thought its important to clear it.</p>
  
  <p>Anyway I want to take this text, find if any char from the first array match a char in the text and if so, replace it with the matching char (according to index) from the second char array.</p>
  
  <p>I'll explain with an example:
  lets say my text (String) is: "java is awesome!";
  i have 2 arrays (char[]):  "absm" and "!@*$".</p>
  
  <p>The wished result is to change 'a' to '!' , 'b' to '@' and so on..
  meaning the resulted text will be:</p>
  
  <p><strong>"java is awesome!" changed to -> "j@v@ i* @w*o$e!"</strong></p>
  
  <p><strong>What is the most efficient way of doing this and why?</strong> 
  I thought about looping the text, but then i found it not so efficient.</p>
  
  <p>(<strong>StringBuilder</strong>/String class can be used)</p>