BufferedWriter
(using BufferedWriter.write()
) after closing the BufferedWriter
(using BufferedWriter.close()
), it will throw an IOException
.BufferedWriter(Writer)
constructor does NOT throw an IOException
. However, the FileWriter(File)
constructor throws a FileNotFoundException
, which extends IOException
. So catching IOException
will also catch FileNotFoundException
, there is never a need for a second catch statement unless you plan on doing something different with the FileNotFoundException
.