what is the use of finalize()Method
please explain with an example
Answer Posted / mrudang
Sometimes u have seen that some objects of java need to
perform an non- java resoures like file handler etc..
Now Suppose that object going to distroy.So java provides
the mechanism that some specific action will perform when u
delect or try to distory that object..
The opration that u want to perform when such kind of
object Distory is written in finalize method...
Is This Answer Correct ? | 12 Yes | 4 No |
Post New Answer View All Answers
What is nested top-level class?
In the below example, how many string objects are created?
Explain how to convert any java object into byte array.
Can we make main() thread as daemon?
Are floats faster than doubles?
how to handle exceptions in ejb?
Can you override private or static method in java?
What is an association?
Why Java doesn’t support multiple inheritance?
Is class is a data type?
Are arrays static in java?
Which java ide is used the most?
Is java se open source?
Why synchronization is important in java?
How to declare objects of a class ?