How does the `finalize()` method relate to garbage collection?
The `finalize()` method allows the program to mark objects for immediate garbage collection.
Iâ€™m a bit disappointed with this answer. `finalize()` does not trigger garbage collection immediately, itâ€™s just a method invoked by the garbage collector.
Can you explain when `finalize()` gets called and what happens to objects after that?