What is finalize() function in java?



What is finalize() function in java?..

Answer / Ankit Singh

The `finalize()` method in Java is a protected method that gets called by the garbage collector when an object is about to be destroyed. It provides a chance for the programmer to release any system resources held by the object before it is deleted.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

I dont want to use serialzable in java is there any another concept so plz tell me

3 Answers   WDC,


What is the difference between overriding & overloading?

1 Answers  


What is the base class for error and exception?

1 Answers  


What class allows you to read objects directly from a stream?

1 Answers  


Java is based on pass by reference or pass by value ..

6 Answers   L&T, Wipro,


Explain different data types in Java.

5 Answers  


What is isa relationship?

1 Answers  


how to use crystal reports in java

2 Answers  


What do you mean by multithreaded program?

1 Answers  


Is null a string?

1 Answers  


How to add and remove nodes in Jtree?

1 Answers  


How to find the length and capacity of a string buffer ?

2 Answers  


Categories