title: Iterating over List in Java8
body: <p>I've seen two different ways to iterate a list in java8.</p>
  
  <p>case 1:</p>
  
  <pre><code>List&lt;String&gt; names = Arrays.asList("Rakesh", "Amal", "Ramez", "Sreejith");
  names.forEach(name -&gt; System.out.println(name));
  </code></pre>
  
  <p>case 2:</p>
  
  <pre><code>List&lt;String&gt; names = Arrays.asList("Rakesh", "Amal", "Ramez", "Sreejith");
  names.forEach(System.out::println);
  </code></pre>
  
  <p>case 1 is by using Lambda expressions And case 2 with method reference <code>::</code></p>
  
  <p>Can any one explain more on these two cases ?</p>