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 a static class in java?
What is java jit compilers?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
Is map sorted in java?
Can we execute a program without main() method?
What does void * mean?
What are the types of methodology?
What is a pattern what is an anti pattern?
What are the 7 types of characters?
What is the use of arraylist class in java?
What is blank final variable?
Explain about automatic type conversion in java?
Explain list interface?
What is the difference between Array and Hash Table?
Which is the best sorting technique in java?