title: Java 8 lambda Void argument
body: <p>Let's say I have the following functional interface in Java 8:</p>
  
  <pre><code>interface Action&lt;T, U&gt; {
     U execute(T t);
  }
  </code></pre>
  
  <p>And for some cases I need an action without arguments or return type. So I write
  something like this:</p>
  
  <pre><code>Action&lt;Void, Void&gt; a = () -&gt; { System.out.println("Do nothing!"); };
  </code></pre>
  
  <p>However, it gives me compile error, I need to write it as</p>
  
  <pre><code>Action&lt;Void, Void&gt; a = (Void v) -&gt; { System.out.println("Do nothing!"); return null;};
  </code></pre>
  
  <p>Which is ugly. Is there any way to get rid of the <code>Void</code> type parameter?</p>