News for hackers. Stuff that matters.
Re:Half a decade with Go by mschulze on Tuesday November 11, 2014 @06:45AM (#8589365)
>Imagine a close() interface in Java. There isn't one

https://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) {

    }
Re:Half a decade with Go by arnehormann on Tuesday November 11, 2014 @07:13AM (#8589440)
My Java is getting rusty... I read about this sometime somewhere but forgot it, thanks! I should have picked something like "String getText()", then.