title: Java's FunctionalInterface with generic function
body: <p>I just started learning Java's functional programming, and got really confused why the class implementation could work but the lambda expression won't in the following expression (I know the way to add the generic to the function is kind of silly, but its for learning purpose). Can anyone help?</p>
  <pre class="lang-java prettyprint-override"><code>
  @FunctionalInterface
  interface Applier {
      &lt;A&gt; void apply(A a);
  }
  
  @FunctionalInterface
  interface Getter {
      &lt;V&gt; V get();
  }
  
  public class Main {
      public static void main(String[] args) {
          Applier nonDoer = TestImpl::apply; //works
          Getter nonGetter = TestImpl::get; //works
          Applier lambdaApply = (Object o) -&gt; {}; // does not work
          Getter lambdaGet = () -&gt; null; // does not work
      }
  }
  
  class TestImpl {
      static void apply(Object O) {
  
      }
  
      static &lt;V&gt; V get() {
          return null;
      }
  }
  </code></pre>