title: Find and replace a word in several text files with Java?
body: <p>How can I find and replace a word in several text files, using Java?</p>
  
  <p>Here's how I do it for a single <code>String</code>...</p>
  
  <pre><code>public class ReplaceAll {
  
      public static void main(String[] args) {
          String str = "We want replace replace word from this string";  
          str = str.replaceAll("replace", "Done");
          System.out.println(str);
      }
  }
  </code></pre>