title: How to add content to File in java
body: <pre><code>public static void main(String args[]) {
          decode E = new decode();
          String input = "apple";
         encode output  = E.compute(input);
          System.out.println("input decoded :" +E.d_decode(output))
  }
  </code></pre>
  
  <p>Hi, I want the <strong>output</strong> to be printed in a file instead of printing it to the console. How do I do that? And I want the file to be created at the run time.I mean I am not adding the output to the already created file</p>
  
  <p>Please be patient as I am new to java</p>