{"provider_name":"Hatena Blog","blog_title":"The King's Museum","type":"rich","blog_url":"https://hjm333.hatenablog.com/","categories":["Java","Effective Java"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhjm333.hatenablog.com%2Fentry%2F2016%2F06%2F21%2F233148\" title=\"\u3010Effective Java\u3011\u9805\u76ee\uff14\uff16\uff1a\u5f93\u6765\u306e for \u30eb\u30fc\u30d7\u3088\u308a for-each \u3092\u9078\u3076 - The King&#39;s Museum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"width":"100%","description":"for \u30eb\u30fc\u30d7\u3088\u308a\u3082 for-each \u30eb\u30fc\u30d7\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002 Java 5 \u3088\u308a\u3082\u524d\u3067\u306f\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3068\u914d\u5217\u3092\u8d70\u67fb\u3059\u308b\u597d\u307e\u3057\u3044\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3057\u305f\u3002 // \u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u8d70\u67fb for (Iterator i = c.iterator; i.haxNext(); ) { doSomething((Element) i.next()); } // \u914d\u5217\u306e\u8d70\u67fb for (int i = 0; i < a.length; i++) { doSomething(i); } Java 5 \u3067\u306f for-each \u304c\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002 \u305d\u306e\u304a\u304b\u3052\u3067\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3082\u914d\u5217\u3082\u6b21\u306e\u3088\u3046\u306b\u8d70\u67fb\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u2026","height":"190","version":"1.0","title":"\u3010Effective Java\u3011\u9805\u76ee\uff14\uff16\uff1a\u5f93\u6765\u306e for \u30eb\u30fc\u30d7\u3088\u308a for-each \u3092\u9078\u3076","author_name":"hjm333","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/hjm333/","published":"2016-06-21 23:31:48","url":"https://hjm333.hatenablog.com/entry/2016/06/21/233148"}