title: Using java.util.function Function interface gives "cannot find symbol" error
body: <p>I am using the below code to create java.util.function  Function> instance and use the return value of Function instance to pass it to the ExecutorService.submit() method.</p>
  
  <p>However I get a "Symbol Not Found" exception. Please help </p>
  
  <p>Below is the code snippet:</p>
  
  <pre><code>   //Approach-1
      Function&lt;Integer, Callable&lt;Integer&gt;&gt; doubleIt_1 = (index) -&gt; {return () -&gt; {return index * 2;};};
      //Approach-2
      Function&lt;Integer, Callable&lt;Integer&gt;&gt; doubleIt_2 = (index) -&gt; () -&gt; {return  index * 2;};
      //Approach 3
      Function&lt;Integer, Callable&lt;Integer&gt;&gt; doubleIt_3 = (index) -&gt; () -&gt; index * 2;
  
      //Use the "doubleIt" lambda function defined above to pass as a Lambda function to ExecutorService threadpool's submit method.
      Function&lt;Integer, Future&lt;Integer&gt;&gt; task = (Integer index) -&gt;  pool.submit(doubleIt_1(index));
  </code></pre>
  
  <p>The compiler throws the error:
  java: cannot find symbol
    symbol:   method doubleIt_1(java.lang.Integer)
    location: class declarative.L12LegacyToFunctionalInterface_4</p>
  
  <p>Please help...</p>