{"height":"190","title":"\u6c4e\u7528\u30b9\u30b3\u30fc\u30d7\u30ac\u30fc\u30c9 in Java8","author_url":"https://blog.hatena.ne.jp/yohhoy/","width":"100%","url":"https://yohhoy.hatenadiary.jp/entry/20140408/p1","provider_name":"Hatena Blog","description":"Java 8\u3067\u5c0e\u5165\u3055\u308c\u305f\u30e9\u30e0\u30c0\u5f0f\u307e\u305f\u306f\u30e1\u30bd\u30c3\u30c9\u53c2\u7167\u3068\u3001Java 7\u4ee5\u964d\u306etry-with-resources\u69cb\u6587\u3092\u7d44\u5408\u305b\u3066\u3001\u4efb\u610f\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3059\u308b\u30b9\u30b3\u30fc\u30d7\u30ac\u30fc\u30c9\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b\u65b9\u6cd5\u3002 // Java 7\u4ee5\u964d class X implements AutoCloseable { // AutoCloseable#close\u3092\u5b9f\u88c5\u3057\u305f\u30af\u30e9\u30b9\u304c\u5fc5\u8981 void close() { ... } } try (X obj = new X(...)) { // ... } // \u4e0a\u8a18\u30b9\u30b3\u30fc\u30d7\u3092\u629c\u3051\u308b\u3068\u304d\u306bobj.close()\u304c\u547c\u3070\u308c\u308b // Java 8\u4ee5\u964d\uff1a\u30e1\u30bd\u30c3\u30c9\u53c2\u7167\u7248 class X { // \u30e1\u2026","type":"rich","image_url":null,"blog_url":"https://yohhoy.hatenadiary.jp/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20140408%2Fp1\" title=\"\u6c4e\u7528\u30b9\u30b3\u30fc\u30d7\u30ac\u30fc\u30c9 in Java8 - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"yohhoy","categories":["Java"],"provider_url":"https://hatena.blog","blog_title":"yohhoy\u306e\u65e5\u8a18","published":"2014-04-08 00:00:00"}