title: Java Thread StackOverflowError
body: <p>...</p>
  
  <pre><code>Thread showWordThread = new Thread() {
      public void run() {
              try {
                  sleep(config.delayTime * 1000);
              } catch (Exception e) {
                  System.out.println(e.toString());
              }
              this.run();
          }
      };
      showWordThread.run();
  }
  </code></pre>
  
  <p>...</p>
  
  <p>It had run for about 5 minutes before error occured:</p>
  
  <p>Exception in thread "Thread-2" java.lang.StackOverflowError.</p>
  
  <p>Why?</p>
  
  <p>I had tried this:</p>
  
  <pre><code>Thread showWordThread = new Thread(new Runnable() {
          public void run() {
              while (true) {
                  try {
                      Thread.sleep(config.delayTime * 1000);
                  } catch (Exception e) {
                      System.out.println(e.toString());
                  }
              }
          }
      });
      showWordThread.start();
  </code></pre>
  
  <p>But error still occured.</p>