title: Java 8 stream's .min() and .max(): why does this compile?
body: <p>Note: this question originates from a dead link which was a previous SO question, but here goes...</p>
  
  <p>See this code (<strong>note: I do know that this code won't "work" and that <code>Integer::compare</code> should be used -- I just extracted it from the linked question</strong>):</p>
  
  <pre><code>final ArrayList &lt;Integer&gt; list 
      = IntStream.rangeClosed(1, 20).boxed().collect(Collectors.toList());
  
  System.out.println(list.stream().max(Integer::max).get());
  System.out.println(list.stream().min(Integer::min).get());
  </code></pre>
  
  <p>According to the javadoc of <a href="http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html#min-java.util.Comparator-" rel="noreferrer"><code>.min()</code></a> and <a href="http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html#max-java.util.Comparator-" rel="noreferrer"><code>.max()</code></a>, the argument of both should be a <code>Comparator</code>. Yet here the method references are to static methods of the <a href="http://download.java.net/jdk8/docs/api/java/lang/Integer.html" rel="noreferrer"><code>Integer</code></a> class.</p>
  
  <p>So, why does this compile at all?</p>