What is diffrance between FINALIZE() & FINALLY ?
Answer Posted / srikanth reddy
FINALIZE()is used when object is garbage collected to
cleanup the resource like io straems or database connection
before gc()method to unrefer the object which refered
finally block is also used to close the resource like jdbc
connection etc
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is append function?
How many characters is 16 bytes?
Can I declare a class as private?
Write the algorithm to check the number non-leaf nodes in a tree.
Which is better 64 bit or 32 bit?
What is treeset in java?
Is vector ordered in java?
What is close method? How it's different from Finalize & Dispose?
Why do we need array in java?
Does printwriter create a file?
What is meant by structural programming?
How many types of memory areas are allocated by JVM in java?
How we can make copy of a java object?
What is meant by class loader? How many types are there? When will we use them?
Can each java object keep track of all the threads that want to exclusively access it?