Created
July 6, 2017 05:05
-
-
Save AkshayChordiya/ca89842cb4228d6723a6e044d6401719 to your computer and use it in GitHub Desktop.
Try with resource example in Java
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
try (FileReader reader = new FileReader("input.txt")) { | |
// Read the file | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
// Automatically closed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment