title: Callable<Void> as Functional Interface with lambdas
body: <p>I am just learning about new java8 features. And here is my question:</p>
  
  <p>Why is it not allowed to use <code>Callable&lt;Void&gt;</code> as a functional interface for lambda expressions? (Compiler complains about returning value)
  And it is still perfectly legal to use <code>Callable&lt;Integer&gt;</code> there. Here is the sample code:</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) throws Exception {
          // works fine
          testInt(() -&gt; {
              System.out.println("From testInt method"); 
              return 1;
          });
  
          testVoid(() -&gt; {
              System.out.println("From testVoid method"); 
              // error! can't return void?
          });
      }
  
      public static void testInt(Callable&lt;Integer&gt; callable) throws Exception {
          callable.call();
      }
  
      public static void testVoid(Callable&lt;Void&gt; callable) throws Exception {
          callable.call();
      }
  }
  </code></pre>
  
  <p>How to explain this behavior?</p>