title: Java 8: Function (Expression) which only returns a value and does not accept any argument
body: <p>In .Net Frameworks, we have the <code>Func&lt;out TResult&gt;</code> which may or may not take any argument but returns something. To be specific, when using this we can do:</p>
  
  <pre><code>int funcTest (Func&lt;int&gt; arg){ return arg();}
  --&gt;
  int i = funcTest(()=&gt;{return 1;})
  </code></pre>
  
  <p>This is while the <code>Function</code> in Java always requires an input argument(<code>Function&lt;T,R&gt;</code>). This is while, there are scenarios where we need expressions similar to the .Net example I explained in the beginning of the question. Although these cases can be handled by passing a null, zero, true/false, or any other dummy value as argument to the expression, this would definitely not be a standard and wise solution for handling such situations. </p>
  
  <p>I have searched the <code>java.util.function</code> library and I found that the majority of the expression types in that namespace require an input argument, so I decided to post this question to see if there's any expression provided in the java standard library similar to the <code>Func&lt;Result&gt;</code> in .Net.</p>