title: Why should I use Runnable instead of Thread?
body: <p>I just learn the theory about thread. And there is Thread and Runnable.</p>
  
  <pre><code>class A extends Thread{
      public void run(){
              while(true) {
                  System.out.println("Hi");
              }           
          }
      }
  </code></pre>
  
  <hr>
  
  <pre><code>class B implements Runnable{
      public void run(){
          System.out.println("Hi");
      }
  }
  </code></pre>
  
  <p>Thread is good with rich API, so why would I use Runnable instead of Thread?</p>
  
  <p>Thanks.</p>