Checked Exceptions
They should be caught:
try
{
   // This can cause an exception
   in = new FileInputStream(file);
} catch (final IOException e)
{
   // Exception handling
   e.printStackTrace();
} finally
{
   // Always applied
   file.delete();
}Or declared:
public handleFile(final File file) throws IOException;Last updated
Was this helpful?