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 method and methodology?
Can constructor be synchronized?
Explain scope or life time of local variables in java?
Explain method overloading?
Why is a singleton bad?
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
What is java object name?
Does every java program need a main?
What do you mean by global variable?
What is an i/o filter?
What are JVM.JRE, J2EE, JNI?
What is difference between add() and addelement() in vector?
What is the difference between procedural and object-oriented programs?
Write a code to create a trigger to call a stored procedure
how would you implement a thread pool? : Java thread