Last active
October 25, 2018 02:53
-
-
Save nwillc/16d0a1bfeed0e551056541967c66251a to your computer and use it in GitHub Desktop.
Old Java exception handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reader reader = null; | |
try { | |
reader = new FileReader("input.txt"); | |
// Use the input | |
} catch (FileNotFoundException e) { | |
// Handle possible exception | |
} catch (IOException e2) { | |
// Handle another exception | |
} finally { | |
if (reader != null) { | |
readert.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment