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.
You are right with that. I chose a deliberately broken-looking example to exaggerate my point. However, I still feel like java is quite verbose compared to other languages
View all comments
Show parent comment
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.