title: delete temporary file in java
body: <p>I'm creating temporary file in java but i'm unable to delete it. This is the code I have written:</p>
  
  <pre><code>temp = File.createTempFile("temp", ".txt");
  temp.deleteOnExit();
  fileoutput = new FileWriter(temp);
  buffout = new BufferedWriter(fileoutput);
  </code></pre>