What is a destructor Java?

What is the destructor in Java? It is a special method that automatically gets called when an object is no longer used . When an object completes its life-cycle the garbage collector deletes that object and deallocates or releases the memory occupied by the object.

Sizin İçin Seçtik  Why is ReactDOM undefined?

Leave a Reply

Your email address will not be published. Required fields are marked *