Question #63983

which method is used to force calling class destructer?

Expert's answer

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/

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS