I\'m writing an app that connect to a website and read one line from it. I do it like this:
try{ URLConnection connection = new URL(\"www.example.com
In scope of Java 8 I would use alike:
try(Resource resource = acquire()) { use(resource); reuse(resource); }