title: in java, use String::length for Comparator.comparing()
body: <p>I have a code piece like this:</p>
  
  <pre><code>String[] yetToSortedArray = {"Abc","hello world","nihao?","chilemaNin"};
  Arrays.parallelSort(yetToSortedArray, Comparator.comparing(String::length));
  for(String str : yetToSortedArray){
      System.out.println(str + ", ");
  }
  </code></pre>
  
  <p>My question is here: "String::length" 
  What am I really passing in to Comparator.comparing()? 
  Why there is no parenthesis for String::length()?</p>
  
  <p>I think I am using this : <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#comparing-java.util.function.Function-java.util.Comparator-" rel="nofollow">https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#comparing-java.util.function.Function-java.util.Comparator-</a></p>
  
  <p>And it says "Accepts a function that extracts a Comparable sort key from a type T, and returns a Comparator that compares by that sort key."</p>
  
  <p>How dos String::length match this type?</p>
  
  <p>Thanks.</p>