title: What does Object.finalize() do?
body: <p>finalize() is one of the 9 methods in java.lang.Object class. The api docs for the function state:</p>
  
  <blockquote>
    <p>Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.</p>
  </blockquote>
  
  <ul>
  <li>But what does the finalize() method actually do?</li>
  <li>What happens if we manually call the finalize() method?</li>
  </ul>