title: How to declare Callable to execute function returning void in Java?
body: <p>Suppose I would like to run static method <code>foo</code> asynchronously </p>
  
  <pre><code>void foo() throws Exception {...} 
  </code></pre>
  
  <p>Since <code>foo</code> throws an exception I would prefer create a <code>Callable</code> and invoke <code>ExecutorService.submit</code> with it to get a <code>Future</code>.</p>
  
  <p>Now I wonder how to declare those <code>Callable</code> and <code>Future</code> properly. 
  Should I declare them </p>
  
  <pre><code>Callable&lt;Void&gt; and Future&lt;Void&gt;?
  </code></pre>