Originally posted by Jain Neeraj:
Answer guide says the correct answers to be a,b and c
I'm not sure why a and c should be correct,
Can anybody help please.
Thanks
"Luck is when opportunity meets preparation"
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Barry Gaunt:
Regarding c) it's an interesting point to consider when you must call super.finalize(). Before your finalization or after? That is the question. As Chandra mentioned constructors are chained. The base constructor is always called before the subclass constructor. For finalizers you have the choice and you must consider carefully when you do call super.finalize.
"Luck is when opportunity meets preparation"
42
public void gc()
Runs the garbage collector. Calling this method suggests that the Java virtual machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the virtual machine has made its best effort to recycle all discarded objects.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
42
And inside of my fortune cookie was this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|