Comment Comment by mschulze >Imagine a close() interface in Java. There isn't onehttps://docs.oracle.com/javase/7/docs/api/java/lang/AutoClos...You can even leave out the finally when you use an autocloseable resource. //r will be closed no matter what try(Resource r = getResource()) { } catch(SomeException e) { } parent mschulze 12 years ago
https://docs.oracle.com/javase/7/docs/api/java/lang/AutoClos...
You can even leave out the finally when you use an autocloseable resource.