posted 12 years ago
Hello Guys,
the finalize method effectively says 5 objects are eligible for garbage collection, @ Aashu now what is STRANGE to me is that the 'null' passed into the constructor at the end of line 12 of your code, the assingment operation to null does NOT seem to have taken effect, because if it does it would have been six objects eligible for garbage collection, now the method System.gc() is NOT on the exams because its function is NOT guarranteed and the certification exams (except Threads) are interested in guarranteed behaviour, that said, I will appreciate it if someone can explain to us why the 'null' in line 12 of this program is NOT assinged to the static variable gcp after the execution of line 12, so there is something I am mixing up here about how line 12 works (Regarding static variables) However I will take my time and investigate where I went wrong.
Regards
Ikpefua
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.