I was given the following phrase in an interview:
The invocation of an Object's finalize() method is the last thing that happens before an object is garbaged collected.
I had to answer by:
I've chosen True
but it was wrong.
Can you please explain me why ?
The order is different:
See http://java.dzone.com/articles/ocajp-7-object-lifecycle-java
Object lifecycle:
- Created
- In use (strongly reachable)
- Invisible
- Unreachable
- Collected
- Finalized
- Deallocated