title: How to replace multiple space to single space in string (java)?
body: <p>What i want to do is to replace multiple space to single space in a string.</p>
  
  <p>I have string variable</p>
  
  <pre><code>String text = "i  want  to  replace   multiple space";
  </code></pre>
  
  <p>and i want it change into </p>
  
  <pre><code>String text = "i want to replace multiple space";
  </code></pre>
  
  <p>how can i do it?, help me please, thanks before.</p>