title: How to change Runnable to lambda expression in Java with IntelliJ shortcut
body: <p>I have the following anonymous <code>Runnable</code> implementation.</p>
  
  <pre><code>Runnable cronTask = new Runnable() {
         @Override
         public void run() {
            // do something
         }
  };
  </code></pre>
  
  <p>IntelliJ suggests that I replace it with a lambda expression. eg: </p>
  
  <pre><code>Runnable cronTask = () -&gt; {
       // multiple "do something" statements
  };
  </code></pre>
  
  <p>When using a single statement the syntax is:</p>
  
  <pre><code>Runnable cronTask = () -&gt; doSomething();
  </code></pre>
  
  <p>What shortcut can I use to convert it?</p>