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 object-oriented paradigm?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
Differences between external iteration and internal iteration?
What is a variable in java?
Who is the owner of java?
What is json parser in java?
What is the diffrence between inner class and nested class?
What is thread life cycle?
How to run a JAR file through command prompt?
Explain about wait() method?
What is the importance of main method in Java?
What is join () in java?
what is the difference between a threads start() and run() methods? : Java thread
Can java hashmap have duplicate keys?
What are runtime exceptions?