title: When wil the new Thread() without reference be garbage collected
body: <p>In the below example, new Thread() doesnt have any reference. Is it possible that it be garbage collected below it is dead ?
  Also without extending Thread class or implementing runnable, how are we creating a thread ?</p>
  
  <pre><code>public class TestFive {
      private int x;
      public void foo() {
              int current = x;
              x = current + 1;
      }
      public void go() {
              for(int i = 0; i &lt; 5; i++) {
                      new Thread() {
                              public void run() {
                                      foo();
                                      System.out.print(x + ", ");
                              } 
                      }.start();
              } 
      }
      public static void main(String args[]){
              TestFive bb = new TestFive();
              bb.go();
      }
  }
  </code></pre>