<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hjm333</author_name>
  <author_url>https://blog.hatena.ne.jp/hjm333/</author_url>
  <blog_title>The King's Museum</blog_title>
  <blog_url>https://hjm333.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>Effective Java</anon>
  </categories>
  <description>for ループよりも for-each ループを利用しましょう。 Java 5 よりも前では、コレクションと配列を走査する好ましい方法は以下の通りでした。 // コレクションの走査 for (Iterator i = c.iterator; i.haxNext(); ) { doSomething((Element) i.next()); } // 配列の走査 for (int i = 0; i &lt; a.length; i++) { doSomething(i); } Java 5 では for-each が導入されました。 そのおかげで、コレクションも配列も次のように走査できるようになりまし…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhjm333.hatenablog.com%2Fentry%2F2016%2F06%2F21%2F233148&quot; title=&quot;【Effective Java】項目４６：従来の for ループより for-each を選ぶ - The King&amp;#39;s Museum&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-06-21 23:31:48</published>
  <title>【Effective Java】項目４６：従来の for ループより for-each を選ぶ</title>
  <type>rich</type>
  <url>https://hjm333.hatenablog.com/entry/2016/06/21/233148</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
