It requires resources that implement `AutoCloseable`. The resource is closed automatically (even on exceptions), which reduces boilerplate and prevents leaks. It’s safer than manual `finally` blocks.
try (var in = Files.newInputStream(path)) {
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
}