title: Java Thread.sleep not working as expect in runnable implement
body: <p>I am trying to figure out how <code>Thread.sleep</code> works, so I create the following piece of code:</p>
  <pre class="lang-java prettyprint-override"><code> public static void main() {
  
          Runnable runnable = new Runnable() {
              public void run() {
                  try {
                      Thread.sleep(1000);
                      System.out.println(&quot;Middle&quot;);
                  } catch (InterruptedException e) {
                  }
              }
          };
  
          System.out.println(&quot;Before&quot;);
          Thread t2 = new Thread(runnable);
          t2.start();
          System.out.println(&quot;After&quot;);
  </code></pre>
  <p>However, it only prints <code>Before</code> and <code>After</code> in the console and skips the <code>Middle</code>.</p>
  <p>So I am wondering whether this Thread.sleep will break the Runnable part??</p>