Does Java have destructors?

No garbage collector does the job working in the background

Showing Answers 1 - 1 of 1 Answers

Java does not support destructors, since java supports the concept of garbage collection,hence the garbage collector is used to automatically free the space which has occupied by the program while running.Garbage collector calls the finalize method which is defined in the object class. finalize method is called once for each object.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions