Unhandled exeption type IOException
<p>I use Eclipse to write the code and I get a red underline at <code>customHandler.saveTransactionToFile();</code> and it says </p>

<blockquote>
  <p>Unhandled exeption type IOException.</p>
</blockquote>

<p>Why does this happen and how could I solve it?</p>

<pre><code>// Call method in customHandler class to write to file when button is pressed
public void actionPerformed(ActionEvent event)
{
    // Save transactions to file
    if(event.getSource()== buttonSaveTransaction)
    {
         customHandler.saveTransactionToFile();
    }
}

// Method in class customHandler that writes to file
public void saveTransactionToFile() throws IOException
{
    System.out.println("Skriver till fil");
    File outFile = new File("C:/JavaBank/" + selectedCustomerAccountNumber + ".data");
    FileOutputStream outFileStream = new FileOutputStream(outFile);
    PrintWriter outStream = new PrintWriter(outFileStream);
    outStream.println("test");
    outStream.close();  
}
</code></pre>
