can we call finalize()?
can we call finalize()?
yes,we can and also you can use System.gc(); method
ofcourse we can call finalize method, and System.gc() is also made for requesting the garbage collection...although System.gc() do not guarantee the garbage coolection.
yes we can call the garbage collection methods, but there is no guarantee that objected marked for garbage collection will be infact garbage collected.
Ideally we should not do call or write logic based on garbage collection. It is the duty of the JVM to call this method.
Real Inspirational Journey........Unanimously & Sincerely.
Yes you can call finalize(), but why you want to do something like this?
Share the problem statement, we might provide you a solution... if you may allow us.