title: Object.finalize() method ignoring exceptions thrown
body: <p>Directly from this <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#finalize%28%29" rel="nofollow">API</a>:</p>
  
  <blockquote>
    <p>If an uncaught exception is thrown by the finalize method, the
    exception is ignored and finalization of that object terminates.</p>
  </blockquote>
  
  <p>I have tried to call finalize() explicitly after having overridden it as follows:</p>
  
  <pre><code> public void finalize() // 
      {
          System.out.println("Garbage Collected");
          throw new RuntimeException();
      }
  </code></pre>
  
  <p>When I call it explicitly though I do get the exception, on the other hand if I let it go implicitly it goes fine ignoring the exception as expected:</p>
  
  <pre><code>public static void main (String []args) throws Exception
  {
  B b = new B();
  b=null;// LINE 3
  
  System.gc(); // It prints "Garbage Collected" and do not throw the exception
  //if it was b.finalize() instead of System.gc() and line 3 was commented out it would print Garbage Collected and then would throw the exception.
  </code></pre>
  
  <p>Why does it happen? why in the first way using <code>System.gc()</code> the API are respected and when called explicitly are not?</p>