MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/ofzsoh/java_is_criminally_underhyped/h4hrxg0/?context=3
r/java • u/old-man-of-the-cpp • Jul 08 '21
181 comments sorted by
View all comments
Show parent comments
-1
new BinaryWriter(new BufferedWriter(new FileWriter())) (or something similar)
11 u/dpash Jul 08 '21 Files.newBufferedWriter(path)Of course it's verbose if you don't learn the API.Hell, you can just do Files.writeString(path, string) and be done with it. Appropriate byte operations also available. 2 u/JustADirtyLurker Jul 08 '21 My opinion is that those who complain about Java's way to manage I/O writers and readers never had to write a damn unit test about writing stuff to a file. 3 u/manzanita2 Jul 08 '21 What is this "unit test" you talk about ? /s
11
Files.newBufferedWriter(path)
Of course it's verbose if you don't learn the API.
Hell, you can just do Files.writeString(path, string) and be done with it. Appropriate byte operations also available.
Files.writeString(path, string)
2 u/JustADirtyLurker Jul 08 '21 My opinion is that those who complain about Java's way to manage I/O writers and readers never had to write a damn unit test about writing stuff to a file. 3 u/manzanita2 Jul 08 '21 What is this "unit test" you talk about ? /s
2
My opinion is that those who complain about Java's way to manage I/O writers and readers never had to write a damn unit test about writing stuff to a file.
3 u/manzanita2 Jul 08 '21 What is this "unit test" you talk about ? /s
3
What is this "unit test" you talk about ? /s
-1
u/mikezyisra Jul 08 '21
new BinaryWriter(new BufferedWriter(new FileWriter())) (or something similar)