well basically if you speak of finalize means the program created everything properly and JVM ran properly without exceptions. Also finalize is run for a object. So what type of object are they talking and reassigning it to a reference variable so that its not eligible for GC won't throw and exception. Basically i think there won't be any exceptions in a finalize. But if there are any exceptions is thrown then it will halt the finalization process that's all. Application won't break down. C is the appropriate answer here. Object won't be gc'd but is still elligible for GC. But next time it will be gc'd as finalize on the object just runs once.
[ SCJP 6.0 - 90% ] , JSP, Servlets and Learning EJB.
Try out the programs using a TextEditor. Textpad - Java 6 api
Joined: Oct 06, 2008
Thank you Nitish ...
subject: what if a runtime exception happen inside a finalize method