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 the size of a string in java?
What are inner classes or non static nested classes in java?
What is lazy programming?
What is the difference between instanceof and isinstance?
What is split return?
What is consumer interface?
Explain creating threads by extending thread class ?
What do you understand by an io stream?
What is meant by distributed application? Why are we using that in our application?
Does java return by reference?
What is the difference between static class and normal class?
Does chrome use java?
What is difference between float and double?
When we serialize an object does the serialization mechanism saves its references too?
What is the use of put method?