title: Runnable Interface and Lambda, is this one of the right ways?
body: <pre><code>class RunnerL implements Runnable {
  
      @Override
      public void run() {
          // TODO Auto-generated method stub
          for (int i = 0; i &lt; 10; i++) {
              System.out.println("demo3-Hello: " + i);
              try {
                  Thread.sleep(100);
              } catch (InterruptedException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
      }
  }
  
  Then, in main function:
  
          Thread t1 = new Thread ( () -&gt; new RunnerL ().run() );
          Thread t2 = new Thread ( () -&gt; new RunnerL ().run() );
  
          t1.start();
          t2.start();
  </code></pre>
  
  <p>This code works.  But is this the one of the right ways to do it?</p>
  
  <p>Also, why does following does not work??</p>
  
  <pre><code>Runnable task3 = () -&gt; new RunnerL ();
  new Thread (task3).start();
  </code></pre>
  
  <p>If I change it to <code>Runnable task3 = () -&gt; new RunnerL ().run()</code> OR <code>Runnable task3 = new RunnerL()</code>, it works, why?</p>