Q. Which method is called when an object is garbage collected?

A
finalize()
B
destroy()
C
delete()
D
cleanup()
Solution:

The finalize() method is invoked by the garbage collector before an object is reclaimed.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!