Comment

Comment by nie100sowny

I wonder why in the middle of 2022 people still put pre-2011 and pre-JDK7 snippets. And even try-with-resources example is not all what JDK7 provides, there are better, high-level utilities added which haven't got a proper attention.

Namely, in JDK7 and newer, you can just write: Files.readAllBytes(Path.get("story.txt"))

parent nie100sowny 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton