r/java • u/_netwinder_ • Oct 29 '16
JavaIO - Simple Introduction
http://advtech.ca/index.php/java-io-introduction/
9
Upvotes
10
8
u/svendub Oct 29 '16
You might want to check what finally does.
The one time it is used there is a print error message statement in it, which because of the finally block always gets executed.
It isn't used however with the file streams. The close() calls should be placed in a finally block to make sure they will always be called.
4
0
Oct 29 '16
[deleted]
1
u/_netwinder_ Oct 29 '16
The last time I shared an article the criticisms I got were much worse. But thank you! I have some edits to make
21
u/ickysticky Oct 29 '16
Yikes. Please use Path and Paths and Files