title: Java vs Scala Functional Interface Usage
body: <p>In Java I can do this:</p>
  
  <pre><code>Runnable task = () -&gt; { System.out.println("Task is running"); };
  </code></pre>
  
  <p>But how come in Scala I can't do the same!</p>
  
  <pre><code>val task: Runnable = () =&gt; {println("Task is running")}
  </code></pre>
  
  <p>I get a compiler error! I am using Scala version 2.11.8.</p>
  
  <pre><code>type mismatch;  found   : () =&gt; Unit  required: Runnable
  </code></pre>