title: garbage collector not working?
body: <p>my JDK version is 1.7.0_25</p>
  
  <pre><code>class A { 
      public void finalize() {
          System.out.println("deleting...");
      }
  }
  
  public class Test {
      public static void main(String[] args) {
          new A();
          System.gc();
          System.out.println("main class");
      }
  }
  </code></pre>
  
  <p>i expected the out put as </p>
  
  <pre><code>deleting...
  main class
  </code></pre>
  
  <p>but in my case there were no output what is the reason ? and when i compile and run the code online with JDK 1.7.0_09 then the outputs are ,</p>
  
  <pre><code>main class
  deleting...
  </code></pre>
  
  <p>why the "main class" prints first ?</p>