title: java use function as parameter and only care about the return value of it
body: <p>How to implement this function below</p>
  <pre><code>public T myFunction(Function&lt;T&gt; func)  //T is the return type
  {
    //...some code
    return func();
  }
  </code></pre>
  <p>And I can use the function like below, and don't need to declare parameters a, b, c in myFunction</p>
  <pre><code>myType result = myFunction(() -&gt; doSomething(a, b , c))
  </code></pre>