title: FileWrite BufferedWriter and PrintWriter combined
body: <p>Ok so I am learning about I/O, and I found the following code in one of the slides. can someone please explain why there is a need to have a FileWrite, BufferedWriter and PrintWriter? I know BufferedWriter is to buffer the output and put it all at once but why would they use FileWriter and PrintWriter ? dont they pretty much do the same with a bit of difference in error handling etc? </p>
  
  <p>And also why do they pass <code>bw</code> to <code>PrintWriter</code>?</p>
  
  <pre><code>      FileWriter fw = new FileWriter (file);
        BufferedWriter bw = new BufferedWriter (fw);
        PrintWriter outFile = new PrintWriter (bw);
  </code></pre>