Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavatry-with-resourcesSingle-choice MCQ

Since Java 9, what is valid inside the try-with-resources header that was not allowed in Java 7/8?

final MyResource r = openResource(); try (r) { use(r); }