Answer on Question #63983- Programming & Computer Science - Java | JSP | JSF
Question
which method is used to force calling class destructor?
Solution
SomeClass object = new SomeClass();
// finalize object
object.finalize();Answer
protected void finalize()
This method called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
https://www.assignmentexpert.com/