<p>Method/constructor references are more compact and readable than using lambdas, and are therefore preferred.</p>

<h2>Noncompliant Code Example</h2>
<pre>
  List<Integer> list = new ArrayList<Integer>();
  list.add(0);
  list.add(1);
  list.add(2);

    list.forEach(n -> { System.out.println(n); });
</pre>

<h2>Compliant Solution</h2>
<pre>
  List<Integer> list = new ArrayList<Integer>();
  list.add(0);
  list.add(1);
  list.add(2);

  list.forEach(System.out::println);
</pre>