title: Remove all occurrences of char from string
body: <p>I can use this:</p>
  
  <pre><code>String str = "TextX Xto modifyX";
  str = str.replace('X','');//that does not work because there is no such character ''
  </code></pre>
  
  <p>Is there a way to remove all occurrences of character <code>X</code> from a String in Java?</p>
  
  <p>I tried this and is not what I want: <code>str.replace('X',' '); //replace with space</code></p>