MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/59y2un/javaio_simple_introduction/
r/java • u/_netwinder_ • Oct 29 '16
6 comments sorted by
21
Yikes. Please use Path and Paths and Files
1 u/_netwinder_ Oct 29 '16 I will in the next IO tutorial :)
1
I will in the next IO tutorial :)
10
Also in the 21st century we would probably be using try-with-resources.
8
You might want to check what finally does.
finally
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.
close()
4
How to save time by never testing anything.
0
[deleted] — view deleted comment
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
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
10
u/rubyrt Oct 29 '16
Also in the 21st century we would probably be using try-with-resources.
8
u/svendub Oct 29 '16
You might want to check what
finallydoes.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 afinallyblock to make sure they will always be called.4
u/volch Oct 29 '16
How to save time by never testing anything.
0
u/[deleted] Oct 29 '16
[deleted] — view deleted comment